Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
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 netdisco-users digest..."
Today's Topics:

   1. Re: Wrong Cisco device uptime (Francesco Schiavarelli)
   2. Re: Wrong Cisco device uptime (Oliver Gorwits)
   3. Truncated port description (Francesco Schiavarelli)
   4. Re: Truncated port description (Oliver Gorwits)
   5. ND2 - Delete nodes from the database (Tobias)
   6. Re: Truncated port description (Francesco Schiavarelli)
   7. Prevent port configuration changes (Francesco Schiavarelli)
   8. Re: Prevent port configuration changes ([email protected])
--- Begin Message ---
On 07/01/2014 10:16 PM, Oliver Gorwits wrote:
Hi Francesco,

Many thanks for the patches!

Your code will be in the next release of Netdisco (2.028000).

minor note: the SNMP::Info patch is not required, because SNMP::Info
allows any known MIB name to be called directly on the object. It
creates a method on the fly, as long as the MIB is loaded (which
SNMP-FRAMEWORK-MIB is). So this works directly in Netdisco:

$info->snmpEngineTime()


Hi Oliver,

thank you for the explanation.
I tested Netdisco 2.028000 and uptime is ok.

regards





--- End Message ---
--- Begin Message ---
On 2014-07-03 14:00, Francesco Schiavarelli wrote:
thank you for the explanation.
I tested Netdisco 2.028000 and uptime is ok.

Great :) Thanks also for the confirmation.

regards,
oliver.



--- End Message ---
--- Begin Message ---
Hi,

when setting port description the description string sometimes gets truncated, e.g. trying to set "giga8-test" as description results in
"giga8" on the router as you can see from the log below:

~$ bin/netdisco-do set_portname -d 1.1.1.1 -p GigabitEthernet0/8 -e "giga8-test"

info @0.000011> set_portname: started at Thu Jul  3 14:45:25 2014
info @0.965388> set_portname: finished at Thu Jul  3 14:45:26 2014
info @0.965699> set_portname: status done: Updated [GigabitEthernet0/8] alias status on [1.1.1.1] to [giga8]

The expected result is that the description set is equal to the string passed as argument to the -e option.

Looking at the code I've found the following line inside Daemon/Worker/Interactive/PortActions.pm:

53  (my $data = $job->subaction) =~ s/-\w+//;

basically whatever follows a dash gets removed from the -e argument so that "giga8-test" becomes "giga8".

I can see no reason for this code, is it a leftover?
May I remove the regexp altogether and keep only the left part of the assignment safely?

thank you
regards




--- End Message ---
--- Begin Message ---
Hi Francesco,

On 2014-07-03 14:27, Francesco Schiavarelli wrote:
when setting port description the description string sometimes gets
truncated, e.g. trying to set "giga8-test" as description results in
"giga8" on the router as you can see from the log below:

Looking at the code I've found the following line inside
Daemon/Worker/Interactive/PortActions.pm:

53  (my $data = $job->subaction) =~ s/-\w+//;

Many thanks for the clear bug report. I see what's going on, and will release a fix as soon as I can.

If you remove that line, then I believe setting up/down status (shutdown) on the port may break. So you have a choice of which feature you want, until I can get the patched version released :)

regards,
oliver.



--- End Message ---
--- Begin Message ---
Hello,
we use Netdisco 2.028000.
I'm looking for a solution to delete all nodes and archived nodes from
the database manually.
With ND1 it was possible to do this by using the options
"--expirenodes" or "--expire-nodes-subnet".
Is it possible and recommended to use the old netdisco binary (1.3.2)
maybe to do this?
In which tables are these information stored if it is necessary to
delete them from the database?
Thanks a lot.
Tobias



--- End Message ---
--- Begin Message ---
On 07/03/2014 06:21 PM, Oliver Gorwits wrote:
Hi Francesco,

On 2014-07-03 14:27, Francesco Schiavarelli wrote:
when setting port description the description string sometimes gets
truncated, e.g. trying to set "giga8-test" as description results in
"giga8" on the router as you can see from the log below:

Looking at the code I've found the following line inside
Daemon/Worker/Interactive/PortActions.pm:

53  (my $data = $job->subaction) =~ s/-\w+//;

Many thanks for the clear bug report. I see what's going on, and will
release a fix as soon as I can.


Thank you Oliver for taking care of this small issue, I'll wait for your fix.

If you remove that line, then I believe setting up/down status
(shutdown) on the port may break. So you have a choice of which feature
you want, until I can get the patched version released :)


I see, I have no use of setting up/down port status, even though I find it an interesting feature. To be honest I'm a bit scared of someone shutting down a port by mistake, in fact I'll soon post a patch that adds a configuration option to prevent this from happening.

regards
Francesco





--- End Message ---
--- Begin Message ---
Hi,

the attached patch introduces a new configuration directive named 'portctl' that completely disables port configuration changes.

It is intended as an extra safety measure against accidentally shutting down a client port and complements the already found portctl_* settings that applies only to uplinks or trunk ports.

When enabled (default value) it does not change the actual behaviour.
When set to false instead it prevents changing port configuration (VLAN ID, operational status, etc...) from the web interface while letting an authorised user change the interface description.

I found it useful in my environment and I would like to share with you.
Please comment and consider for upstream inclusion.

regards
Francesco
diff -ruN App-Netdisco-2.028000.ori/lib/App/Netdisco/Manual/Configuration.pod App-Netdisco-2.028000/lib/App/Netdisco/Manual/Configuration.pod
--- App-Netdisco-2.028000.ori/lib/App/Netdisco/Manual/Configuration.pod	2014-07-07 16:46:18.473755983 +0200
+++ App-Netdisco-2.028000/lib/App/Netdisco/Manual/Configuration.pod	2014-07-07 16:50:51.165334579 +0200
@@ -782,6 +782,14 @@
 Value: Boolean. Default: C<true>.
 
 Set to false to prevent users from changing the default VLAN on an interface.
+This setting has no effect when C<portctl> below is set to false.
+
+=head3 C<portctl>
+
+Value: Boolean. Default: C<true>.
+
+Set to false to prevent Netdisco from changing the configuration of an
+interface.
 
 =head3 C<portctl_nophones>
 
diff -ruN App-Netdisco-2.028000.ori/lib/App/Netdisco/Util/Port.pm App-Netdisco-2.028000/lib/App/Netdisco/Util/Port.pm
--- App-Netdisco-2.028000.ori/lib/App/Netdisco/Util/Port.pm	2014-07-07 16:46:19.329781622 +0200
+++ App-Netdisco-2.028000/lib/App/Netdisco/Util/Port.pm	2014-07-07 16:53:27.533340736 +0200
@@ -68,6 +68,10 @@
 
 =item *
 
+Permission check that C<portctl> is true in Netdisco config.
+
+=item *
+
 Permission check that C<portctl_uplinks> is true in Netdisco config, if
 C<$port> is an uplink.
 
@@ -95,6 +99,9 @@
   my $has_phone = port_has_phone($port);
   my $is_vlan   = is_vlan_interface($port);
 
+  return "forbidden: not permitted to change port configuration"
+    if not setting('portctl');
+
   # uplink check
   return "forbidden: port [$name] on [$ip] is an uplink"
     if $port->remote_type and not $has_phone and not setting('portctl_uplinks');
diff -ruN App-Netdisco-2.028000.ori/share/config.yml App-Netdisco-2.028000/share/config.yml
--- App-Netdisco-2.028000.ori/share/config.yml	2014-07-07 16:46:19.513787071 +0200
+++ App-Netdisco-2.028000/share/config.yml	2014-07-07 16:54:00.462141350 +0200
@@ -144,6 +144,7 @@
 ignore_private_nets: false
 reverse_sysname: false
 vlanctl: true
+portctl: true
 portctl_nophones: false
 portctl_vlans: false
 portctl_uplinks: false

--- End Message ---
--- Begin Message ---
Hi,

i'm in 2 minds about whether NetDISCO should only be an inventory/reporting 
system or whether it should
continue down the route of being a switch configuration/control tool too.... :-)

alan



--- End Message ---
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to