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] UNNAMED PROJECT branch netdot-1.0 updated.
      netdot-1.0.1-64-g069b070 ([email protected])
   2. [SCM] UNNAMED PROJECT branch netdot-1.0 updated.
      netdot-1.0.1-65-gf3272a1 ([email protected])
   3. Re: interface number='0' (Carlos Vicente)


----------------------------------------------------------------------

Message: 1
Date: Mon, 1 Oct 2012 06:28:43 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] UNNAMED PROJECT branch netdot-1.0
        updated.        netdot-1.0.1-64-g069b070
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 "UNNAMED PROJECT".

The branch, netdot-1.0 has been updated
       via  069b070d8466caffd1bdb8b9a035f1515fcd13ce (commit)
       via  0f49d89ac502c13dd67f3978b979d18da4111140 (commit)
      from  9e7829b86ffb9d7e1eeac5e65d775d4ef85dbe2c (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 069b070d8466caffd1bdb8b9a035f1515fcd13ce
Author: Carlos Vicente <[email protected]>
Date:   Mon Oct 1 09:28:17 2012 -0400

    Avoid bogus interfaces with number=0

diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 0756717..0a100a6 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -1127,7 +1127,7 @@ sub get_snmp_info {
 
     ################################################################
     # IPv6 link-local addresses
-    # It looks like in Cisco 'ipv6_index' contains a the addresses from
+    # It looks like in Cisco 'ipv6_index' contains all the addresses from
     # 'ipv6_addr_prefix', plus link locals, so we won't query it
     # unless we want those.
     unless ( $ignore_link_local ){
@@ -1138,6 +1138,7 @@ sub get_snmp_info {
                $addr = $self->_octet_string_to_v6($1);
                next unless Ipblock->is_link_local($addr);
                $iid = $val;
+               next unless $iid; # Sometimes this can be 0
                $dev{interface}{$iid}{ips}{$addr}{address} = $addr;
                $dev{interface}{$iid}{ips}{$addr}{version} = 6;
            }else{

commit 0f49d89ac502c13dd67f3978b979d18da4111140
Author: Carlos Vicente <[email protected]>
Date:   Fri Sep 28 13:53:07 2012 -0400

    Fix for #1684 (Custom attributes for subnets, containers, etc.)

diff --git a/htdocs/management/ip.html b/htdocs/management/ip.html
index 103e24d..5e2b8b4 100644
--- a/htdocs/management/ip.html
+++ b/htdocs/management/ip.html
@@ -686,8 +686,10 @@ if ( my @parents = $o->get_ancestors ){
        my @field_headers;
        my @cell_data;
 
-       # Address:
-       my %addr_tmp = $ui->form_field(object=>$o, column=>"address", 
edit=>$edit_ip, htmlExtra=>"style='width: 15em'");
+################################################################
+# Address
+       my %addr_tmp = $ui->form_field(object=>$o, column=>"address", 
edit=>$edit_ip, 
+                                     htmlExtra=>"style='width: 15em'");
        push( @field_headers, $addr_tmp{'label'} );
        push( @cell_data, $addr_tmp{'value'} );
 
@@ -741,6 +743,7 @@ if ( my @parents = $o->get_ancestors ){
 
     </div>
 
+%################################################################
 %# Comments section
 <div class="container">
     <div class="containerheadleft">
@@ -770,8 +773,8 @@ print $tmp{value};
  </div>
 
 
+%################################################################
 <%perl>
-
 if (!$edit){
     print '<div class="container">';
     print '<div class="containerheadleft">DNS A Records</div>';
@@ -861,6 +864,8 @@ if ( $edit ){
 </%perl>
 % if ( $manager && $manager->can($user, "access_section", 
'ip.html:edit_ipinfo') ){
 
+
+%################################################################
 <div class="container">
     <div class="containerheadleft">Services</div>
     <div class="containerheadright">
@@ -898,8 +903,6 @@ if ( $edit ){
 % }
 
 %################################################################
-%# Custom Attributes
-%################################################################
 <!-- Display Custom Attributes -->
 % my @attributes = $o->attributes;
   <div class="container">
@@ -921,6 +924,7 @@ if ( $edit ){
 <!-- End Display Custom Attributes -->
 
 
+%################################################################
 <!-- Display ARP -->
 <%perl>
 # Get latest arp entries
@@ -1028,6 +1032,11 @@ if ( $edit ){
 %         } else {
             <li><a href="ip.html?id=<% $id %>&view=Rights">Access 
Rights</a></li>
 %         }
+%         if( $view eq "Attributes" ) {
+              <li><span>Attributes</span></li>
+%         } else {
+            <li><a href="ip.html?id=<% $id 
%>&view=Attributes">Attributes</a></li>
+%         }
 %         if( $view eq "Comments" ) {
               <li><span>Comments</span></li>
 %         } else {
@@ -1648,6 +1657,30 @@ if ( $_action eq 'VIEW_ADD_RIGHTS' ){
 %  }
 % }
 
+%################################################################
+<!-- Display Custom Attributes -->
+% if ( $view eq 'Attributes' || $view eq 'All' ){
+%  if ( $manager && $manager->can($user, "access_section", 
'ip.html:edit_attributes') ){
+%      my @attributes = $o->attributes;
+  <div class="container">
+    <div class="containerheadleft"><strong>Custom Attributes</strong></div>
+    <div class="containerheadright">
+%     if ( @attributes ) {
+        <a href="ip.html?id=<% $o %>&editattr=1">[edit]</a>
+%     }
+%   if ( $manager && $manager->can($user, 'edit', $o) ){
+        <a href="edit.html?table=IpblockAttr&ipblock=<% $o %>">[add]</a>
+%   }else{
+        &nbsp;
+%   }
+    </div>
+    <div class="containerbody">
+        <& /generic/sortresults.mhtml, object=>\@attributes, 
withedit=>$editattr, return_args=>"?id=$id" &>
+    </div>
+  </div>
+<!-- End Display Custom Attributes -->
+% }
+%}
 
 %################################################################
 %# Graphical Views

-----------------------------------------------------------------------

Summary of changes:
 htdocs/management/ip.html  |   43 ++++++++++++++++++++++++++++++++++++++-----
 lib/Netdot/Model/Device.pm |    3 ++-
 2 files changed, 40 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
UNNAMED PROJECT


------------------------------

Message: 2
Date: Mon, 1 Oct 2012 07:38:36 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] UNNAMED PROJECT branch netdot-1.0
        updated.        netdot-1.0.1-65-gf3272a1
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 "UNNAMED PROJECT".

The branch, netdot-1.0 has been updated
       via  f3272a1392707f96d70e5a243dc07770ab45bb38 (commit)
      from  069b070d8466caffd1bdb8b9a035f1515fcd13ce (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 f3272a1392707f96d70e5a243dc07770ab45bb38
Author: Carlos Vicente <[email protected]>
Date:   Mon Oct 1 10:38:19 2012 -0400

    Remove the requirement for sysServices

diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 0a100a6..eaeeb86 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -724,7 +724,7 @@ sub get_snmp_info {
 
     ################################################################
     # Device's global vars
-    $dev{layers}       = $sinfo->layers;
+    $dev{layers} = $sinfo->layers;
     my $ipf = $sinfo->ipforwarding || 'unknown';
     $dev{ipforwarding} = ( $ipf eq 'forwarding') ? 1 : 0;
     $dev{sysobjectid}  = $sinfo->id;
@@ -3775,7 +3775,7 @@ sub _get_snmp_session {
        $sinfoargs{BulkWalk} = 0;
     }
 
-    my ($sinfo, $layers);
+    my $sinfo;
 
     # Deal with the number of connection attempts and the snmp_down flag
     # We need to do this in a couple of places
@@ -3817,11 +3817,6 @@ sub _get_snmp_session {
                                          $sinfoargs{Version}, $argv{host}, 
$err));
            }
            
-           # Test for connectivity
-           $layers = $sinfo->layers() || 
-               $self->throw_user(sprintf("Device::_get_snmp_session: %s: 
SNMPv%d failed: No sysServices", 
-                                         $argv{host}, $sinfoargs{Version}));
-           
        }else {
            &_check_max_attempts($self, $argv{host});
            $self->throw_user(sprintf("Device::get_snmp_session: %s: SNMPv%d 
failed", 
@@ -3857,12 +3852,6 @@ sub _get_snmp_session {
                                              "community '%s': %s", 
                                              $sinfoargs{Version}, $argv{host}, 
$sinfoargs{Community}, $err));
                }
-               # Test for connectivity
-               $layers = $sinfo->layers() || 
-                   $self->throw_user(sprintf("Device::_get_snmp_session: %s: 
SNMPv%d failed: ".
-                                             "No sysServices", 
-                                             $argv{host}, 
$sinfoargs{Version}));
-
                last; # If we made it here, we are fine.  Stop trying 
communities
 
            }else{

-----------------------------------------------------------------------

Summary of changes:
 lib/Netdot/Model/Device.pm |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
UNNAMED PROJECT


------------------------------

Message: 3
Date: Mon, 01 Oct 2012 11:48:23 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-devel] interface number='0'
To: Karl Putland <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi Karl,

I believe that I have found and fixed the issue.

See diff:

https://osl.uoregon.edu/redmine/projects/netdot/repository/revisions/069b070d8466caffd1bdb8b9a035f1515fcd13ce/diff/lib/Netdot/Model/Device.pm

Thanks for the report.

cv

On 9/10/12 4:02 PM, Karl Putland wrote:
> 
> I don't have a cause yet, but I get a lot of interface number='0' and
> have to delete them.
> The updatedevices.pl <http://updatedevices.pl> has issues with the
> excessive number, or creates them...
> 
> I did it by hand once :/
> 
> postgres=# \c netdot
> You are now connected to database "netdot" as user "postgres".
> netdot=# delete from interface_history where interface_id in (select id
> from interface where number = '0' and doc_status = 'removed');
> DELETE 376
> netdot=# delete from interface where number = '0' and doc_status =
> 'removed';
> DELETE 188
> netdot=# 
> 
> 
> 
> --Karl
> 
> Karl Putland
> Senior VoIP Engineer
> 
> *SimpleSignal*
> 3600 S Yosemite, Suite 150
> Denver, CO 80237
> One Number Rings All My Phones: 303-242-8608
> 
> SimpleSignal.com <http://www.simplesignal.com/> | Blog
> <http://www.simplesignal.com/blog> | Facebook
> <http://www.facebook.com/SimpleSignal?ref=ts> | Twitter
> <http://twitter.com/simplesignal>
> 
> 
> 
> _______________________________________________
> Netdot-devel mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-devel
> 


-- 
cv


------------------------------

_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel


End of Netdot-devel Digest, Vol 67, Issue 1
*******************************************

Reply via email to