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. Invitation to connect on LinkedIn (Emmanuel Togo)
   2. topology image broken (Julien Vandeschricke)
   3. [Netdot - Bug #1657] (New) Cannot manually set    Device Product
      ([email protected])
   4. [Netdot - Bug #1658] (New) REST interface is broken
      ([email protected])
   5. [SCM] Netdot Git repository branch netdot-1.0     updated.
      netdot-1.0.1-RC3-12-g0c5e9c0 (Apache)


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

Message: 1
Date: Wed, 18 Jul 2012 01:18:51 +0000 (UTC)
From: Emmanuel Togo <[email protected]>
Subject: [Netdot-devel] Invitation to connect on LinkedIn
To: netdot-devel <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="utf-8"

LinkedIn
------------



I'd like to add you to my professional network on LinkedIn.

- Emmanuel

Emmanuel Togo
Network Engineer at Ghana
Ghana

Confirm that you know Emmanuel Togo:
https://www.linkedin.com/e/-pyf2dm-h4rq3ca7-45/isd/7896776077/u_BS7Lzo/?hs=false&tok=2BilNVwz8KrRk1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-pyf2dm-h4rq3ca7-45/AWtoTpoOI2aDwXOfeT78jB8FcCa-gGwlWPhoGp0O6UF/goo/netdot-devel%40osl%2Euoregon%2Eedu/20061/I2666180429_1/?hs=false&tok=1NZyBYMCgKrRk1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://osl.uoregon.edu/pipermail/netdot-devel/attachments/20120718/6f224162/attachment-0001.html
 

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

Message: 2
Date: Wed, 18 Jul 2012 09:56:12 +0400 (RET)
From: Julien Vandeschricke <[email protected]>
Subject: [Netdot-devel] topology image broken
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"





All, 



I hope someone can help me. I have a problem with the topology image. If I 
don't show the interface name it work well. But if I check "show interface 
names" and there are more two devices, the result is a broken image. I saw the 
post about Graphviz and so I have the lastest version. 



Regards, 



Julien Vandeschricke 

Stagiaire ESIEA 


+262(0) 262 525 727 
www.opensphere.fr 

Adoptez l'?co-attitude. N'imprimez ce mail que si c'est vraiment n?cessaire. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://osl.uoregon.edu/pipermail/netdot-devel/attachments/20120718/fab556de/attachment-0001.html
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenSphere-zimbra ok.png
Type: image/png
Size: 5434 bytes
Desc: not available
Url : 
http://osl.uoregon.edu/pipermail/netdot-devel/attachments/20120718/fab556de/attachment-0001.png
 

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

Message: 3
Date: Wed, 18 Jul 2012 01:30:13 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1657] (New) Cannot manually set
        Device Product
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1657 has been reported by Matej Vadnjal.

----------------------------------------
Bug #1657: Cannot manually set Device Product
https://osl.uoregon.edu/redmine/issues/1657

Author: Matej Vadnjal
Status: New
Priority: Normal
Assignee: 
Category: DeviceManagement
Target version: 
Resolution: 


Each device has an Asset which is an instance of a Product. Asset and product 
get automatically created and assigned to a device on SNMP update. This is fine.

I have a bunch of Cisco 3750 switches with different port configurations which 
all get discovered as Product: Cisco 37xxStack. I can than manually edit each 
asset and assign a different product in the web interface - eg product Cisco 
WS-C3750G-24TS or Cisco WS-C3750G-12S.

However on the next SNMP update, the product for all these assets is reset to 
Cisco 37xxStack.

Looking at the code (Device.pm sub info_update) I see that you first get the 
product from SNMP info, then try to find an asset. This of course overrides any 
customisation of asset - product relation. But in _update_modules sub this is 
the other way around - first lookup the assed based on serial number, then find 
or create a product.

If you turn this around in info_update as well customized product info for 
assets persists across SNMP updates.

Attached is a patch that does this - though you might want to do this a bit 
more nicely :)




-- 
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: 4
Date: Wed, 18 Jul 2012 03:50:25 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1658] (New) REST interface is
        broken
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1658 has been reported by Matej Vadnjal.

----------------------------------------
Bug #1658: REST interface is broken
https://osl.uoregon.edu/redmine/issues/1658

Author: Matej Vadnjal
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 
Resolution: 


A request for /netdot/rest/device/ results in an error:

<pre>
error:  Can't call method "headers_in" on an undefined value at 
/usr/local/netdot/lib/Netdot/REST.pm line 119.
context:        
...     
115:     my $r = delete $argv{r} || $self->throw_fatal("You need to pass 
request object");
116:     $self->{request} = $argv{r};
117:    
118:     # Get relevant HTTP headers from request object
119:     my $headers = $self->{request}->headers_in;
120:    
121:     $logger->info(sprintf("Netdot::REST::handle_resource: %s request for 
%s?%s from %s (%s)",
122:     $self->{request}->method,
123:     $resource,
...     
code stack:      /usr/local/netdot/lib/Netdot/REST.pm:119
/usr/local/netdot/htdocs/rest/dhandler:34
/usr/local/netdot/htdocs/rest/autohandler:22
/usr/local/netdot/htdocs/autohandler:76
</pre>

If I change line 116 to:
<pre>
$self->{request} = $r;
</pre>

it works.

Netdot 1.0.1 RC3


-- 
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: Wed, 18 Jul 2012 09:08:11 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
        updated. netdot-1.0.1-RC3-12-g0c5e9c0
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  0c5e9c08cf089bc7a4d19baad6a3c7a741848a16 (commit)
       via  90f0d1528cb66945ccbaf6c6f37ab8f903337973 (commit)
       via  f5a14527b893d877e76b34f4247e895dd19ef60d (commit)
       via  e807aee30fb9aa017f1d89cf270f56894b94dad0 (commit)
       via  a21e7b8322f8e1162461db03048bd8e98e4ac273 (commit)
       via  e155543b549d2f0bfefd0fa71784b059b7685620 (commit)
       via  10a5d4c13eb5adb50934676fc6d8d1e16c5283f4 (commit)
       via  c4e1b353af9071416a2dbf7e71037431e28a6829 (commit)
       via  7e5cfa12837cd50d12bc6901df98a5bc39eb9fcd (commit)
       via  e283da480824b958edae30646e96696293d55221 (commit)
      from  a4d2fb757791bb8d28ec7c880d50dad8f0db5708 (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 0c5e9c08cf089bc7a4d19baad6a3c7a741848a16
Merge: 90f0d15 a4d2fb7
Author: Carlos Vicente <[email protected]>
Date:   Tue Jul 17 02:56:22 2012 -0400

    Merge branch 'netdot-1.0' of https://netdot.uoregon.edu/git/netdot into 
netdot-1.0


commit 90f0d1528cb66945ccbaf6c6f37ab8f903337973
Author: Carlos Vicente <[email protected]>
Date:   Tue Jul 17 02:50:46 2012 -0400

    Fix for #1658 (REST interface is broken)

diff --git a/lib/Netdot/REST.pm b/lib/Netdot/REST.pm
index 0dc2293..f2e10e9 100644
--- a/lib/Netdot/REST.pm
+++ b/lib/Netdot/REST.pm
@@ -113,7 +113,7 @@ sub handle_resource {
     
     my $resource = delete $argv{resource} || $self->throw_fatal("You need to 
pass resource");
     my $r = delete $argv{r}               || $self->throw_fatal("You need to 
pass request object");
-    $self->{request} = $argv{r};
+    $self->{request} = $r;
 
     # Get relevant HTTP headers from request object
     my $headers = $self->{request}->headers_in;

commit f5a14527b893d877e76b34f4247e895dd19ef60d
Author: Carlos Vicente <[email protected]>
Date:   Tue Jul 17 00:45:03 2012 -0400

    debug instead of warn about too long value

diff --git a/lib/Netdot/Model.pm b/lib/Netdot/Model.pm
index d053928..0c89359 100644
--- a/lib/Netdot/Model.pm
+++ b/lib/Netdot/Model.pm
@@ -1187,11 +1187,13 @@ sub _adjust_vals{
     map { $meta_columns{$_->name} = $_ } $class->meta_data->get_columns;
     foreach my $field ( keys %$args ){
        my $mcol = $meta_columns{$field} || $class->throw_fatal("Cannot find 
$field in $class metadata");
-       if ( !blessed($args->{$field}) && $mcol->sql_type eq 'varchar' && 
defined($mcol->length) && $mcol->length =~ /^\d+$/ ) {
+       if ( !blessed($args->{$field}) && $mcol->sql_type eq 'varchar' 
+            && defined($mcol->length) && $mcol->length =~ /^\d+$/ ) {
             if (defined($args->{$field}) && length($args->{$field}) > 
$mcol->length) {
-               my $msg = "Value for field '$field' (max " . $mcol->length . ") 
is too long: '$args->{$field}'";
+               my $msg = "Value for field '$field' (max " . $mcol->length . 
+                   ") is too long: '$args->{$field}'";
                if ( $ENV{REMOTE_USER} eq 'netdot' ){
-                   $logger->warn($msg);
+                   $logger->debug($msg);
                }else{
                    $class->throw_user($msg);
                }

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

Summary of changes:
 lib/Netdot/Model.pm |    8 +++++---
 lib/Netdot/REST.pm  |    2 +-
 2 files changed, 6 insertions(+), 4 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 15
********************************************

Reply via email to