Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."
Today's Topics:
1. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-46-g40c56b9 (Apache)
2. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-48-g4aae688 (Apache)
3. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-49-g465954a (Apache)
4. [Netdot - Bug #1667] (New) System error in IP Tree view
([email protected])
5. [Netdot - Feature #1668] (New) more columns in IP List
([email protected])
6. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-55-gfe02d28 (Apache)
----------------------------------------------------------------------
Message: 1
Date: Wed, 25 Jul 2012 12:33:29 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-46-g40c56b9
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot Git repository".
The branch, netdot-1.0 has been updated
via 40c56b90b7c7b336ecd377122737bef74c3dbc72 (commit)
via e3192b87e054360cce2f1177e592178989436210 (commit)
from 3ab586b7af95345362dffe6516b6fa3550cd6e02 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 40c56b90b7c7b336ecd377122737bef74c3dbc72
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 15:32:45 2012 -0400
Do not stop exporting other zones if one zone has errors
diff --git a/bin/exporter.pl b/bin/exporter.pl
index 523f39d..005d45c 100755
--- a/bin/exporter.pl
+++ b/bin/exporter.pl
@@ -79,15 +79,24 @@ foreach my $type ( split ',', $self{types} ){
my @zones = split ',', $self{zones};
$args{zones} = \@zones;
}
- $exporter->generate_configs(%args);
+ eval {
+ $exporter->generate_configs(%args);
+ };
+ $logger->error($@) if $@;
}elsif ( $type eq 'DHCPD' ){
my %args;
$args{scopes} = [split ',', $self{scopes}] if $self{scopes};
$args{force} = $self{force} if $self{force};
- $exporter->generate_configs(%args);
+ eval {
+ $exporter->generate_configs(%args);
+ };
+ $logger->error($@) if $@;
}else{
- $exporter->generate_configs();
+ eval {
+ $exporter->generate_configs();
+ };
+ $logger->error($@) if $@;
}
}
diff --git a/lib/Netdot/Exporter/BIND.pm b/lib/Netdot/Exporter/BIND.pm
index 57c2a82..b03ebfc 100644
--- a/lib/Netdot/Exporter/BIND.pm
+++ b/lib/Netdot/Exporter/BIND.pm
@@ -127,9 +127,8 @@ sub print_zone_to_file {
|| $self->throw_user(sprintf('Zone %s: Apex record (@) not defined',
$zone->name));
my @ns_records = $apex->ns_records();
- $self->throw_user('Zone has no NS records')
+ $self->throw_user(sprintf("Zone %s has no NS records", $zone->name))
unless @ns_records;
-
my $rec = $zone->get_all_records();
commit e3192b87e054360cce2f1177e592178989436210
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 14:56:46 2012 -0400
Corrections
diff --git a/htdocs/management/host.html b/htdocs/management/host.html
index c0543b8..d82d8a3 100644
--- a/htdocs/management/host.html
+++ b/htdocs/management/host.html
@@ -53,8 +53,8 @@ if ( $rr ){
$rrs{$rr->id} = $rr;
}
-if ($ipblock && !ref $ipblock) {
- $ipblock = Ipblock->retrieve($ipblock);
+if ( $ipblock ) {
+ $ipblock = Ipblock->objectify($ipblock);
unless ( $manager && $manager->can($user, "view", $ipblock) ){
$m->comp('/generic/error.mhtml', error=>"You don't have permission to
view this object");
}
@@ -144,8 +144,6 @@ if ( $submit ){
}
}
}
-
-
</%init>
<%perl>
@@ -204,19 +202,39 @@ if ($action eq 'new') {
$ui->add_to_fields(edit=>1, table=>'RR', fields=>['name'],
field_headers=>\@field_headers, cell_data=>\@cell_data);
+ my %ffargs = (table=>'RR', column=>'zone', edit=>1, linkPage=>'zone.html');
+
if ( defined $zone ){
- unless ( ref($zone) ){
- $zone = Zone->retrieve($zone);
- }
+ $zone = Zone->objectify($zone);
}elsif ( $ipblock ){
- unless ( ref($ipblock) ){
- $ipblock = Ipblock->retrieve($ipblock);
- }
+ $ipblock = Ipblock->objectify($ipblock);
$zone = $ipblock->forward_zone();
}
- my %ffargs = (table=>'RR', column=>'zone', edit=>1, linkPage=>'zone.html');
- $ffargs{default} = $zone->id if $zone;
+ # Make sure that user does not add a record to a zone for which
+ # they don't have permissions
+ my @select_list;
+ if ( $zone ){
+ @select_list = ( $zone );
+ $ffargs{default} = $zone->id;
+ }
+ foreach my $z ( sort { $a->name cmp $b->name } Zone->retrieve_all ){
+ next if $z->is_dot_arpa;
+ next unless $z->active;
+ next if $zone && ($z->id == $zone->id);
+ if ( $manager && $manager->can($user, 'edit', $z) ){
+ push @select_list, $z;
+ }
+ }
+ # The list needs to have at least one item, otherwise
+ # the form_field function will display all zones
+ scalar @select_list or push(@select_list, undef);
+ $ffargs{defaults} = \@select_list;
+
+ unless ( $manager && $manager->can($user, 'access_section',
'new_zone_button') ){
+ $ffargs{new_button} = 0;
+ }
+
my %tmp = $ui->form_field(%ffargs);
push( @field_headers, $tmp{label} );
push( @cell_data, $tmp{value} );
diff --git a/htdocs/management/ip.html b/htdocs/management/ip.html
index ad44e28..25ab549 100644
--- a/htdocs/management/ip.html
+++ b/htdocs/management/ip.html
@@ -746,7 +746,7 @@ if (!$edit){
print '<div class="container">';
print '<div class="containerheadleft">DNS A Records</div>';
print '<div class="containerheadright">';
- if ( $manager && $manager->can($user, 'edit', $o) ){
+ if ( $manager && $manager->can($user, 'edit', $o->parent) ){
print "<a href=\"host.html?ipblock=$o&action=new\">[add]</a>";
}else{
print ' ';
diff --git a/lib/Netdot/UI.pm b/lib/Netdot/UI.pm
index 255f0f8..4ceec65 100644
--- a/lib/Netdot/UI.pm
+++ b/lib/Netdot/UI.pm
@@ -520,14 +520,14 @@ sub select_lookup{
} else {
$name = $table . '__' . $id . '__' . $column;
}
- if( $args{edit} && $args{defaults} && $args{default} ) {
- # If there is a default element specified, then we don't actually want
a list of choices.
- # So, don't show a select box, but instead, make a hidden form element
with the id,
- # and print out the name of the default element.
+ if( $args{edit} && @defaults && (scalar(@defaults) == 1) && $args{default}
) {
+ # If there is a default element specified, then we don't actually want
a list of choices.
+ # So, don't show a select box, but instead, make a hidden form element
with the id,
+ # and print out the name of the default element.
- # should be only 1 element in @defaults
- $output .= '<input type="hidden" name="'.$name.'"
value="'.$args{default}.'">';
- $output .= $defaults[0]->get_label;
+ # should be only 1 element in @defaults
+ $output .= '<input type="hidden" name="'.$name.'"
value="'.$args{default}.'">';
+ $output .= $defaults[0]->get_label;
} elsif( $args{edit} ){
my ($count, @fo);
if ( @defaults ){
-----------------------------------------------------------------------
Summary of changes:
bin/exporter.pl | 15 ++++++++++++---
htdocs/management/host.html | 42 ++++++++++++++++++++++++++++++------------
htdocs/management/ip.html | 2 +-
lib/Netdot/Exporter/BIND.pm | 3 +--
lib/Netdot/UI.pm | 14 +++++++-------
5 files changed, 51 insertions(+), 25 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 2
Date: Wed, 25 Jul 2012 13:03:53 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-48-g4aae688
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot Git repository".
The branch, netdot-1.0 has been updated
via 4aae6888f49cbfe391a00084567b20e310b81d32 (commit)
via 4c218539eaf13a707e6085bd45ea9e6026ed9035 (commit)
from 40c56b90b7c7b336ecd377122737bef74c3dbc72 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4aae6888f49cbfe391a00084567b20e310b81d32
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 15:57:51 2012 -0400
Corrections
diff --git a/bin/exporter.pl b/bin/exporter.pl
index 005d45c..523f39d 100755
--- a/bin/exporter.pl
+++ b/bin/exporter.pl
@@ -79,24 +79,15 @@ foreach my $type ( split ',', $self{types} ){
my @zones = split ',', $self{zones};
$args{zones} = \@zones;
}
- eval {
- $exporter->generate_configs(%args);
- };
- $logger->error($@) if $@;
+ $exporter->generate_configs(%args);
}elsif ( $type eq 'DHCPD' ){
my %args;
$args{scopes} = [split ',', $self{scopes}] if $self{scopes};
$args{force} = $self{force} if $self{force};
- eval {
- $exporter->generate_configs(%args);
- };
- $logger->error($@) if $@;
+ $exporter->generate_configs(%args);
}else{
- eval {
- $exporter->generate_configs();
- };
- $logger->error($@) if $@;
+ $exporter->generate_configs();
}
}
diff --git a/lib/Netdot/Exporter/BIND.pm b/lib/Netdot/Exporter/BIND.pm
index b03ebfc..3f341f0 100644
--- a/lib/Netdot/Exporter/BIND.pm
+++ b/lib/Netdot/Exporter/BIND.pm
@@ -83,21 +83,24 @@ sub generate_configs {
}
foreach my $zone ( @zones ){
- Netdot::Model->do_transaction(sub{
- if ( HostAudit->search(zone=>$zone->name, pending=>1) ||
$argv{force} ){
- if ( $zone->active ){
- my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
- my @pending = HostAudit->search(zone=>$zone->name,
pending=>1);
- foreach my $record ( @pending ){
- # Un-mark audit records as pending
- $record->update({pending=>0});
+ eval {
+ Netdot::Model->do_transaction(sub{
+ if ( HostAudit->search(zone=>$zone->name, pending=>1) ||
$argv{force} ){
+ if ( $zone->active ){
+ my $path = $self->print_zone_to_file(zone=>$zone,
nopriv=>$argv{nopriv});
+ my @pending = HostAudit->search(zone=>$zone->name,
pending=>1);
+ foreach my $record ( @pending ){
+ # Un-mark audit records as pending
+ $record->update({pending=>0});
+ }
+ $logger->info("Zone ".$zone->name." written to file:
$path");
}
- $logger->info("Zone ".$zone->name." written to file:
$path");
+ }else{
+ $logger->debug("Exporter::BIND::generate_configs:
".$zone->name.": No pending changes. Use -f to force.");
}
- }else{
- $logger->debug("Exporter::BIND::generate_configs:
".$zone->name.": No pending changes. Use -f to force.");
- }
- });
+ });
+ };
+ $logger->error($@) if $@;
}
}
commit 4c218539eaf13a707e6085bd45ea9e6026ed9035
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 15:57:14 2012 -0400
Remove unnecessary carriage returns from transaction error message
diff --git a/lib/Netdot/Model.pm b/lib/Netdot/Model.pm
index f43a2b4..5c358a6 100644
--- a/lib/Netdot/Model.pm
+++ b/lib/Netdot/Model.pm
@@ -753,14 +753,14 @@ sub do_transaction {
my $rollback_error = $@;
if ( $rollback_error ){
$self->throw_fatal("Transaction aborted: $e; "
- . "(Rollback failed): $rollback_error\n");
+ . "(Rollback failed): $rollback_error");
}else{
# Rethrow
if ( ref($e) =~ /Netdot::Util::Exception/ &&
$e->isa_netdot_exception('User') ){
- $self->throw_user("Transaction aborted: $e\n");
+ $self->throw_user("Transaction aborted: $e");
}else{
- $self->throw_fatal("Transaction aborted: $e\n");
+ $self->throw_fatal("Transaction aborted: $e");
}
}
return;
-----------------------------------------------------------------------
Summary of changes:
bin/exporter.pl | 15 +++------------
lib/Netdot/Exporter/BIND.pm | 29 ++++++++++++++++-------------
lib/Netdot/Model.pm | 6 +++---
3 files changed, 22 insertions(+), 28 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 3
Date: Wed, 25 Jul 2012 13:25:45 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-49-g465954a
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot Git repository".
The branch, netdot-1.0 has been updated
via 465954ad59d53fb75f21e11690d33c3d4d7675a7 (commit)
from 4aae6888f49cbfe391a00084567b20e310b81d32 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 465954ad59d53fb75f21e11690d33c3d4d7675a7
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 16:24:14 2012 -0400
More corrections
diff --git a/htdocs/management/host.html b/htdocs/management/host.html
index d82d8a3..c7d671d 100644
--- a/htdocs/management/host.html
+++ b/htdocs/management/host.html
@@ -29,30 +29,29 @@ my $deleted_label;
my $manager = $ui->get_permission_manager($r);
-if ($id) {
+if ( $id ) {
$rr = RR->retrieve($id);
$m->comp('/generic/error.mhtml', error=>"Could not retrieve RR id $id")
unless $id;
+ $rrs{$rr->id} = $rr;
}elsif ( $rr ){
+ my @tmp;
if ( ref($rr) eq 'ARRAY' ){
- # We somehow got an arrayref. Ignore this.
- undef($rr);
- }elsif ( !ref($rr) ) {
- $rr = RR->retrieve($rr);
- $m->comp('/generic/error.mhtml', error=>"Could not retrieve RR id $rr")
- unless $rr;
- $id = $rr->id;
+ @tmp = @$rr;
+ }else {
+ push @tmp, $rr;
}
-}
-
-# Check if user can view this object
-if ( $rr ){
- unless ( $manager && $manager->can($user, "view", $rr) ){
- $m->comp('/generic/error.mhtml', error=>"You don't have permission to
view this object");
+ foreach ( @tmp ){
+ $_ = RR->retrieve($_) unless ref($_);
+ # Check if user can view this object
+ unless ( $manager && $manager->can($user, "view", $_) ){
+ $m->comp('/generic/error.mhtml', error=>"You don't have permission
to view this object");
+ }
+ $rrs{$_->id} = $_;
}
- $rrs{$rr->id} = $rr;
}
+
if ( $ipblock ) {
$ipblock = Ipblock->objectify($ipblock);
unless ( $manager && $manager->can($user, "view", $ipblock) ){
@@ -821,7 +820,8 @@ foreach my $o ( values %rrs ) {
print '<script type="text/javascript"
language="javascript">uricomponents[\'rrns_'.$o.'_content\']=encodeURIComponent(\''.$newns.'\');</script>';
print ' ';
if ( !$edit ){
- if ( $manager && $manager->can($user, 'edit', $o) ){
+ if ( $manager && $manager->can($user, 'access_section',
'add_ns_records')
+ && $manager->can($user, 'edit', $o) ){
print '<div id="rrns_'.$o.'"><a href="#"
onClick="dynamicAdd(\'rrns\', \''.$o.'\', 1, \'rr\')">[add]</a></div>';
}
}
@@ -1073,7 +1073,8 @@ foreach my $o ( values %rrs ) {
} # close restrict if
print '</div>'; #close container
-
+
+ print '<br>';
}
print '</div>'; #close outer containerbody
-----------------------------------------------------------------------
Summary of changes:
htdocs/management/host.html | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 4
Date: Thu, 26 Jul 2012 03:36:01 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1667] (New) System error in IP
Tree view
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1667 has been reported by Florian Sch?del.
----------------------------------------
Bug #1667: System error in IP Tree view
https://osl.uoregon.edu/redmine/issues/1667
Author: Florian Sch?del
Status: New
Priority: Normal
Assignee:
Category: IPManagement
Target version: 1.0.1-RC3
Resolution:
I've got an error, when opening
https://xxx/netdot/management/ip.html?id=3&view=Children&view_format=tree
error: Can't call method "data" without a package or object reference
at /usr/local/netdot/lib/Netdot/UI.pm line 1603.
context:
...
1599:
1600: my %seen;
1601:
1602: foreach my $n ( @$list ){
1603: my $ip = Ipblock->retrieve($n->data);
1604:
1605: # Make sure we don't have a null reference
1606: next unless($ip);
1607:
...
code stack: /usr/local/netdot/lib/Netdot/UI.pm:1603
/usr/local/netdot/lib/Netdot/UI.pm:1681
/usr/local/netdot/htdocs/management/tree.mhtml:18
/usr/local/netdot/htdocs/management/ip.html:1629
/usr/local/netdot/htdocs/management/autohandler:81
/usr/share/perl5/HTML/Mason/Request.pm:948
/usr/local/netdot/htdocs/masondata/obj/1249759374/management/autohandler.obj:21
/usr/local/netdot/htdocs/autohandler:76
----------------------
Can't call method "data" without a package or object reference at
/usr/local/netdot/lib/Netdot/UI.pm line 1603.
Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "data" without a
package or object reference at /usr/local/netdot/lib/Netdot/UI.pm line
1603.^J') called at /usr/local/netdot/lib/Netdot/UI.pm line 1603
Netdot::UI::build_ip_tree_graph('Netdot::UI=HASH(0x7f1a0f040990)', 'web_path',
'/netdot/', 'filename',
'/usr/local/netdot/htdocs/img/graphs/Ipblock-tree-3.png', 'id', 3, 'list',
'ARRAY(0x7f1a1297c7c8)') called at /usr/local/netdot/lib/Netdot/UI.pm line 1681
Netdot::UI::build_ip_tree_graph_html('Netdot::UI=HASH(0x7f1a0f040990)', 'id',
3, 'list', 'ARRAY(0x7f1a1297c7c8)', 'web_path', '/netdot/') called at
/usr/local/netdot/htdocs/management/tree.mhtml line 18
HTML::Mason::Commands::__ANON__('network', 'Ipblock=HASH(0x7f1a128cfae8)')
called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f1a129234e8)',
'network', 'Ipblock=HASH(0x7f1a128cfae8)') called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, 'network',
'Ipblock=HASH(0x7f1a128cfae8)') called at
/usr/local/netdot/htdocs/management/ip.html line 1629
HTML::Mason::Commands::__ANON__('view_format', 'tree', 'view', 'Children',
'id', 3, 'showheader', 1, 'page', 'ADDRESS') called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f1a12719310)',
'view_format', 'tree', 'view', 'Children', 'id', 3, 'showheader', 1, 'page',
'ADDRESS') called at /usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view_format', 'tree', 'view',
'Children', 'id', 3, 'showheader', 1, 'page', 'ADDRESS') called at
/usr/share/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x7f1a12876240)',
'page', 'ADDRESS') called at /usr/local/netdot/htdocs/management/autohandler
line 81
HTML::Mason::Commands::__ANON__('view_format', 'tree', 'view', 'Children',
'id', 3, 'showheader', 1) called at /usr/share/perl5/HTML/Mason/Component.pm
line 157
HTML::Mason::Component::run_dynamic_sub('HTML::Mason::Component::FileBased=HASH(0x7f1a1278b2c8)',
'main', 'view_format', 'tree', 'view', 'Children', 'id', 3, 'showheader', 1)
called at /usr/share/perl5/HTML/Mason/Request.pm line 948
HTML::Mason::Request::call_dynamic('HTML::Mason::Request::ApacheHandler=HASH(0x7f1a12876240)',
'main', 'view_format', 'tree', 'view', 'Children', 'id', 3, 'showheader', 1)
called at
/usr/local/netdot/htdocs/masondata/obj/1249759374/management/autohandler.obj
line 21
HTML::Mason::Commands::__ANON__('view_format', 'tree', 'view', 'Children',
'id', 3, 'showheader', 1) called at /usr/share/perl5/HTML/Mason/Component.pm
line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f1a1278b2c8)',
'view_format', 'tree', 'view', 'Children', 'id', 3, 'showheader', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view_format', 'tree', 'view',
'Children', 'id', 3, 'showheader', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x7f1a12876240)',
'showheader', 1) called at /usr/local/netdot/htdocs/autohandler line 76
HTML::Mason::Commands::__ANON__('view_format', 'tree', 'view', 'Children',
'id', 3) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f1a127a4988)',
'view_format', 'tree', 'view', 'Children', 'id', 3) called at
/usr/share/perl5/HTML/Mason/Request.pm line 1297
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view_format', 'tree', 'view',
'Children', 'id', 3) called at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f1a12876240)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f1a12876240)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f1a125bbbe8)',
'Apache2::RequestRec=SCALAR(0x7f1a1283aaf8)') called at
/usr/local/netdot/lib/Netdot/Mason.pm line 40
Netdot::Mason::handler('Apache2::RequestRec=SCALAR(0x7f1a1283aaf8)') called at
-e line 0
eval {...} at -e line 0
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 5
Date: Thu, 26 Jul 2012 03:57:32 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1668] (New) more columns in
IP List
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1668 has been reported by Florian Sch?del.
----------------------------------------
Feature #1668: more columns in IP List
https://osl.uoregon.edu/redmine/issues/1668
Author: Florian Sch?del
Status: New
Priority: Normal
Assignee:
Category: IPManagement
Target version: 1.0.1-RC3
Resolution:
I am evaluating netdot a the moment. I try to find out if netdot is the right
tool for documentation of the it infrastructur of my company.
1) During demonstration my colleagues and me have noticed that the device names
are not shown in list view of https://xxx/netdot/management/ip.html if we do
not maintain DNS information of our devices in netdot.
Is there a chance to show the device name of the device, which is using an ip
address, even if there is no valid dns config?
2) Most of the documented devices in our company have a web based admin gui.
I've seen that there is a hyperlink to http(s)://<device-name>.<domain-name> on
each device page. The problem is, that we do not use DNS for all devices.
Therefore we cannot access the device's websurface by clicking on this link. Is
there any config-flag to switch this device links from
http(s)://<device-name>.<domain-name> to http(s)://<mgmt-ip-address> or
something else.
FW-Builder solves thes issue by marking an interface as "mgmt-interface". The
assigned IP-Address of this interface is taken for mgmt purpose of the
corresponding device.
Please tell me if you have any suggestions to solve my requests - thanks a lot
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 6
Date: Thu, 26 Jul 2012 08:15:40 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-55-gfe02d28
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot Git repository".
The branch, netdot-1.0 has been updated
via fe02d28d7cda42223f2faf7d3e2f3f37ba6ba921 (commit)
via f55deea649ed5115f02024debae70f535e7198d3 (commit)
via f73c9f72340d8ed9c1051be5be028ddb5d8601a6 (commit)
via 0850dfda1b7fdf3396cc381d98a13e5b7df2c2eb (commit)
via e26f8c4ae975697b5cfb94ab4ee68988eba6d65f (commit)
via f63973b338656ff9c0f83a73e74e4a991392ff31 (commit)
from 465954ad59d53fb75f21e11690d33c3d4d7675a7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fe02d28d7cda42223f2faf7d3e2f3f37ba6ba921
Author: Carlos Vicente <[email protected]>
Date: Thu Jul 26 11:14:50 2012 -0400
Fix for #194 (In Backbone cable page, make it easier to 'unsplice' a group
of strands)
diff --git a/htdocs/cable_plant/cable_backbone.html
b/htdocs/cable_plant/cable_backbone.html
index 522681a..f953550 100644
--- a/htdocs/cable_plant/cable_backbone.html
+++ b/htdocs/cable_plant/cable_backbone.html
@@ -16,6 +16,7 @@ $fiber_type => undef
$range1 => undef
$range2 => undef
$splice_bb_end => undef
+$splice_action => undef
$strand_range => undef
$user => $ui->get_current_user($r)
</%args>
@@ -129,7 +130,7 @@ elsif ( defined($_action) && $_action eq "ADD_STRANDS" ){
}
# splice cables by a range of strands
-elsif (defined($_action) && $_action eq "ADD_SPLICE_RANGE") {
+elsif (defined($_action) && $_action eq "SPLICE_RANGE") {
$m->comp("../generic/error.mhtml", error => "range1, range2, or backbone
not specified.")
if (!$range1 || !$range2 || !$splice_bb_end);
@@ -163,9 +164,11 @@ elsif (defined($_action) && $_action eq
"ADD_SPLICE_RANGE") {
$m->comp("../generic/error.mhtml", error=>"$@") if $@;
}
- # and now lets add our splices...
- for (my $i = 0, my $len = scalar(@start_strands); $i < $len; ++$i) {
- Splice->insert({strand1=>$start_strands[$i],
strand2=>$end_strands[$i]});
+ if ( $splice_action eq 'add' ){
+ # and now lets add our splices...
+ for (my $i = 0, my $len = scalar(@start_strands); $i < $len; ++$i) {
+ Splice->insert({strand1=>$start_strands[$i],
strand2=>$end_strands[$i]});
+ }
}
}
@@ -684,15 +687,19 @@ HERE
% if ( $o->strands && @bbones ){
<div class="container">
<div class="containerhead">
- Manually Splice Strand Range
+ Splice/Unsplice Strand Range
</div>
<div class="containerbody">
<form action="cable_backbone.html" method="POST">
<input type="hidden" name="id" value="<% $id %>" />
- <input type="hidden" name="_action" value="ADD_SPLICE_RANGE" />
- Splice strands (i.e. 1-12)
- <input type="text" name="range1" value="" size="4"> from this
backbone, to strands
+ <input type="hidden" name="_action" value="SPLICE_RANGE" />
+ <SELECT NAME="splice_action">
+ <OPTION VALUE="add">Splice</OPTION>
+ <OPTION VALUE="delete">Unsplice</OPTION>
+ </SELECT>
+ Strands (i.e. 1-12)
+ <input type="text" name="range1" value="" size="4"> from this
backbone, and strands
<input type="text" name="range2" value="" size="4"> from
<SELECT NAME="splice_bb_end">
<OPTION VALUE="">Backbone...</OPTION>
@@ -705,7 +712,7 @@ HERE
}
</%perl>
</SELECT>
- <input type="submit" name="splice_add" value="Go">
+ <input type="submit" name="splice_update" value="Go">
</form>
</div>
</div>
commit f55deea649ed5115f02024debae70f535e7198d3
Author: Carlos Vicente <[email protected]>
Date: Thu Jul 26 11:14:27 2012 -0400
Correction
diff --git a/htdocs/cable_plant/display_sequence.mhtml
b/htdocs/cable_plant/display_sequence.mhtml
index 799f557..8d1543d 100644
--- a/htdocs/cable_plant/display_sequence.mhtml
+++ b/htdocs/cable_plant/display_sequence.mhtml
@@ -82,14 +82,14 @@ my $manager = $ui->get_permission_manager($r);
foreach my $st ( @{$strands} ){
if ( my $seq = $st->get_sequence() ){
foreach my $row ( @$seq ) {
- push(@links, sprintf("<A
HREF=\"cable_strand.html?id=%d\">[%s]</A>", @$row[0], @$row[1]));
+ push(@links, sprintf("<A
HREF=\"cable_strand.html?id=%d\">[%s]</A>", $row->[0], $row->[1]));
}
}
}
printf("%s\n", join($delimiter, @links));
</%perl>
% }
-%if ( $strands && @$strands ) {
+%if ( $table_view && $strands && @$strands ) {
<div align="left"><input type="submit" name="submit_seq"
value="Unassign"></div>
%}
commit f73c9f72340d8ed9c1051be5be028ddb5d8601a6
Author: Carlos Vicente <[email protected]>
Date: Thu Jul 26 10:26:29 2012 -0400
Fixed problem adding strands to circuit when strands belonged to single
backbone connecting start and end sites
diff --git a/htdocs/cable_plant/display_sequence.mhtml
b/htdocs/cable_plant/display_sequence.mhtml
index e4fbe2a..799f557 100644
--- a/htdocs/cable_plant/display_sequence.mhtml
+++ b/htdocs/cable_plant/display_sequence.mhtml
@@ -57,9 +57,9 @@ my $manager = $ui->get_permission_manager($r);
% my @ids = ();
% if ( my $seq = $st->get_sequence() ){
% foreach my $row ( @$seq ) {
-% $found{@$row[0]} = 1;
-% push(@links, sprintf("<A
HREF=\"cable_strand.html?id=%d\">%s</A>", @$row[0], @$row[1]));
-% push(@ids, @$row[0]);
+% $found{$row->[0]} = 1;
+% push(@links, sprintf("<A
HREF=\"cable_strand.html?id=%d\">%s</A>", $row->[0], $row->[1]));
+% push(@ids, $row->[0]);
% }
% }
<tr align="left" class="<% $cssitem{$j} %>">
diff --git a/htdocs/cable_plant/get_strand_sequence_list.html
b/htdocs/cable_plant/get_strand_sequence_list.html
index 1ce9b5e..701be99 100644
--- a/htdocs/cable_plant/get_strand_sequence_list.html
+++ b/htdocs/cable_plant/get_strand_sequence_list.html
@@ -22,19 +22,33 @@ $form_name
my @terms;
my $DEBUG = 0;
my $MAX_RESULTS = 1000;
+my $sequences = CableStrand->find_sequences($start_id, $end_id);
+use Data::Dumper;
</%init>
% print "<pre> ", Dumper(%ARGS), "</pre><br>" if $DEBUG;
<html>
<body>
+
+
+<%perl>
+if ( $DEBUG) {
+ foreach my $seq ( @$sequences ){
+ my (@names, @ids);
+ foreach my $row ( @$seq ){
+ print Dumper($row), '<br>';
+ }
+ }
+}
+</%perl>
+
<script language="JavaScript">
<!--
<%perl>
printf("opener.document.forms[\'%s\'][\'%s\'].options.length = 0;\n",
$form_name, $field_name);
my $i = 0;
-my $sequences = CableStrand->find_sequences($start_id, $end_id);
foreach my $seq ( @$sequences ){
my (@names, @ids);
foreach my $row ( @$seq ){
diff --git a/lib/Netdot/Model/CableStrand.pm b/lib/Netdot/Model/CableStrand.pm
index 28f19e7..c6541bd 100644
--- a/lib/Netdot/Model/CableStrand.pm
+++ b/lib/Netdot/Model/CableStrand.pm
@@ -10,22 +10,27 @@ my $logger = Netdot->log->get_logger('Netdot::Model');
Netdot::Model::CableStrand
-=head1 SYNOPSIS
-
-
=head1 CLASS METHODS
=cut
##################################################################
-=head2 find_sequences - Fetch available sequences between sites
+=head2 find_sequences - Fetch available sequences of strands between sites
Arguments:
- start: id of starting Site.
- end: id of ending Site.
Returns:
- Arrayref
+ Arrayref containing an arrayref for each group of strands which
+ are spliced together, or which belong to a single backbone connecting
+ the given sites. Each third-level arrayref contains a cable strand id
+ and its name.
Examples:
$sequences = CableStrand->find_sequences($start, $end);
+ foreach my $seq ( @$sequences ){
+ foreach my $strand ( @$ ){
+ printf ("ID: %d, Name: %s", $strand->id, $strand->name);
+ }
+ }
=cut
sub find_sequences{
@@ -38,6 +43,27 @@ sub find_sequences{
my $dbh = $class->db_Main;
eval{
+ # Get strands from backbones connecting given sites
+ my $strandsq1 = "SELECT DISTINCT cs.id, cs.name
+ FROM cablestrand cs, backbonecable bc,
+ closet c1, closet c2, room r1, room r2,
+ floor f1, floor f2, site a, site b
+ WHERE cs.circuit_id IS NULL AND cs.cable=bc.id
+ AND a.id = $start AND b.id = $end
+ AND c1.room=r1.id
+ AND r1.floor=f1.id
+ AND f1.site=a.id
+ AND c2.room=r2.id
+ AND r2.floor=f2.id
+ AND f2.site=b.id
+ AND ( (bc.start_closet=c1.id AND
bc.end_closet=c2.id)
+ OR (bc.end_closet=c1.id AND
bc.start_closet=c2.id) )";
+
+ my $rows = $dbh->selectall_arrayref($strandsq1);
+ foreach my $row ( @$rows ){
+ push @sequences, [$row];
+ }
+
# Get strands that either start or end in given sites
my $strands_st = $dbh->prepare_cached("SELECT DISTINCT cs.id
FROM cablestrand cs,
backbonecable bc, closet c,
@@ -146,7 +172,7 @@ sub get_sequence_path {
$st->execute($id);
if ( $st->rows() == 0 ) {
- return;
+ push @ret, $id;
}else{
$strand = $self->find_endpoint() if ( $st->rows() > 1 );
$st->execute($strand);
@@ -217,9 +243,9 @@ sub find_endpoint{
Arguments:
None
Returns:
- Array ref
+ Array ref of array refs containing strand id and name
Examples:
- $strand->get_sequence();
+ my $seq = $strand->get_sequence();
=cut
sub get_sequence {
my ($self) = @_;
commit 0850dfda1b7fdf3396cc381d98a13e5b7df2c2eb
Author: Carlos Vicente <[email protected]>
Date: Thu Jul 26 10:24:29 2012 -0400
Could not select circuit interfaces if list was under max list threshold
diff --git a/htdocs/cable_plant/circuit_interfaces.mhtml
b/htdocs/cable_plant/circuit_interfaces.mhtml
index adaf9bc..5c1b3ac 100644
--- a/htdocs/cable_plant/circuit_interfaces.mhtml
+++ b/htdocs/cable_plant/circuit_interfaces.mhtml
@@ -68,7 +68,7 @@ my $manager = $ui->get_permission_manager($r);
if ( $count <= $max_count ){
my @all = sort { $a->get_label cmp
$b->get_label } Interface->retrieve_all;
- print '<select>';
+ print '<select name="new_interface" id="new_interface">';
foreach my $i ( @all ){
printf('<option value="%d">%s</option>', $i->id,
$i->get_label);
}
@@ -89,11 +89,11 @@ my $manager = $ui->get_permission_manager($r);
print '<option value="" selected>-- Select --</option>';
print '<option value="">[null]</option>';
print '</select>';
- print ' <input type="submit" name="add_button" value="Add">';
- print '</nobr>';
- print '<p><input type="button" name="cancel_button"
value="cancel" '.
- 'onClick="history.go(-1);">';
}
+ print ' <input type="submit" name="add_button" value="Add">';
+ print '</nobr>';
+ print '<p><input type="button" name="cancel_button" value="cancel" '.
+ 'onClick="history.go(-1);">';
</%perl>
</form>
</div>
commit e26f8c4ae975697b5cfb94ab4ee68988eba6d65f
Author: Carlos Vicente <[email protected]>
Date: Thu Jul 26 10:23:23 2012 -0400
Fix incorrect path for error component in circuit page
diff --git a/htdocs/cable_plant/circuit.html b/htdocs/cable_plant/circuit.html
index ef0d8b8..19a7b54 100644
--- a/htdocs/cable_plant/circuit.html
+++ b/htdocs/cable_plant/circuit.html
@@ -62,7 +62,7 @@ if ( $_action ){
}
}
}else{
- $m->comp("error.mhtml", error=>"Empty sequence list");
+ $m->comp("/generic/error.mhtml", error=>"Empty sequence list");
}
}elsif( $_action eq "UPDATE_SEQUENCES" ){
foreach my $key ( keys(%ARGS) ) {
@@ -74,7 +74,7 @@ if ( $_action ){
$strand->update({circuit_id=>""});
};
if ( my $e = $@ ){
- $m->comp("error.mhtml", error=>"Problem updating strand:
$e");
+ $m->comp("/generic/error.mhtml", error=>"Problem updating
strand: $e");
}
}
}
@@ -85,10 +85,10 @@ if ( $_action ){
$i->update({circuit=>$o});
};
if ( my $e = $@ ){
- $m->comp("error.mhtml", error=>"Problem updating interface:
$e");
+ $m->comp("/generic/error.mhtml", error=>"Problem updating
interface: $e");
}
}else{
- $m->comp("error.mhtml", error=>"No interface selected, or invalid
value");
+ $m->comp("/generic/error.mhtml", error=>"No interface selected, or
invalid value");
}
}elsif( $_action eq "UPDATE_INTERFACES" ){
my @ints;
commit f63973b338656ff9c0f83a73e74e4a991392ff31
Author: Carlos Vicente <[email protected]>
Date: Wed Jul 25 16:50:29 2012 -0400
More corrections
diff --git a/htdocs/management/host.html b/htdocs/management/host.html
index c7d671d..7511905 100644
--- a/htdocs/management/host.html
+++ b/htdocs/management/host.html
@@ -122,7 +122,7 @@ if ( $submit ){
# Add new RR to %rrs hash
# Also, if RR was just updated, this re-reads it from the DB
# to avoid the old values from showing up
- my $newrr = RR->retrieve($id);
+ my $newrr = RR->retrieve($newid);
defined $newrr || $m->comp('/generic/error.mhtml',
error=>"Could not retrieve RR id $id"); ;
$rrs{$newrr->id} = $newrr;
-----------------------------------------------------------------------
Summary of changes:
htdocs/cable_plant/cable_backbone.html | 25 ++++++++-----
htdocs/cable_plant/circuit.html | 8 ++--
htdocs/cable_plant/circuit_interfaces.mhtml | 10 +++---
htdocs/cable_plant/display_sequence.mhtml | 10 +++---
htdocs/cable_plant/get_strand_sequence_list.html | 16 ++++++++-
htdocs/management/host.html | 2 +-
lib/Netdot/Model/CableStrand.pm | 42 +++++++++++++++++----
7 files changed, 80 insertions(+), 33 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 64, Issue 25
********************************************