summaryrefslogtreecommitdiffstats
path: root/INF
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2019-05-14 11:41:19 +0100
committerroot <root@no.no.james.local>2019-05-14 11:41:19 +0100
commit9dfebdb7499c2d927ca63100f45535926198c106 (patch)
tree8e9e8d020867ac8bfb7ba5fe198bbf5c6e37f41b /INF
parent5cb8c234f0ce52b4c79851854f9830b092b42dd7 (diff)
downloadinf-9dfebdb7499c2d927ca63100f45535926198c106.tar.gz
inf-9dfebdb7499c2d927ca63100f45535926198c106.tar.bz2
inf-9dfebdb7499c2d927ca63100f45535926198c106.zip
topology and update master from slaves
Diffstat (limited to 'INF')
-rw-r--r--INF/DSRx020.pm68
1 files changed, 67 insertions, 1 deletions
diff --git a/INF/DSRx020.pm b/INF/DSRx020.pm
index 2c67ec4..191f4bf 100644
--- a/INF/DSRx020.pm
+++ b/INF/DSRx020.pm
@@ -399,7 +399,27 @@ sub port_name_set($$$) {
if ( $port =~ /P(\d+)\.(\d+)/ ) {
return $self->spc_set_name( $1, $2, $name );
}
- else {
+ elsif ($port =~ /K(\d+)/ ) {
+ my $index= $1;
+ my $res = $self->do_post(
+ { file => 'view-units-by-target-devices' },
+ [
+ file => 'overview-dsr',
+ saveParms => 'overview-dsr',
+ name => '',
+ index => $index,
+ targetname => $name,
+ action => 'SAVE',
+ ]
+ );
+
+ #oid => '141057',
+
+ $self->flush();
+
+ return undef unless $res->is_success;
+ return "Success";
+ } else {
return undef;
}
}
@@ -443,6 +463,52 @@ sub port_count($) {
return scalar( @{ $self->{ports} } );
}
+sub port_get_topology($$)
+{
+ my ( $self, $port ) = @_;
+
+ return unless $port =~ /K(\d+)/;
+
+ my $res = $self->do_get(
+ {
+ file => 'jnlp',
+ index => $1
+ }
+ );
+
+ return undef unless defined $res;
+
+ my $xml = new XML::Simple;
+
+ my $c = $res->content;
+
+ $c =~ s/^[\s\n\r]+//s;
+
+ my $data = $xml->XMLin($c);
+
+ return undef unless defined $data->{'application-desc'};
+
+ my $args = $data->{'application-desc'}->{'argument'};
+
+ return undef unless defined $args;
+
+ my $ret = undef ;
+
+ for my $arg (@$args) {
+
+
+ next unless $arg =~ /^path=a:[^,]*,p:([0-9]+),c:([0-9]+),/;
+ print $arg," -> ", $1, " ",$2 ,"\n";
+ return [$1,$2];
+ }
+
+
+ return undef;
+
+}
+
+
+
sub view($$) {
my ( $self, $port ) = @_;