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. [Netdot - Feature #1859] (New) Add SSH and Telnet links for
devices ([email protected])
2. [Netdot - Bug #1858] (Resolved) Device page shows incorrect
"Last Updated" timestamp for devices that cannot be reached
([email protected])
3. [SCM] Netdot branch master updated. netdot-1.0.7-14-g6c06762
([email protected])
4. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.7-14-g6c06762 ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 6 May 2015 12:53:51 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1859] (New) Add SSH and
Telnet links for devices
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1859 has been reported by Timothy Snowberger.
----------------------------------------
Feature #1859: Add SSH and Telnet links for devices
https://osl.uoregon.edu/redmine/issues/1859
Author: Timothy Snowberger
Status: New
Priority: Normal
Assignee:
Category: DeviceManagement
Target version: 1.0.7
Resolution:
I have attached a small patch that will add SSH and Telnet links to the device
management page next to HTTP and HTTPS, which when clicked utilize
ssh://<device fqdn> or telnet://<device fqdn> URIs to launch whatever
application you have registered to handle those URIs respectively. I've found
this can be a nice little shortcut for hopping into a device after having
viewed netdot records, and can certainly save a few keystrokes. I've also
included some .reg files for creating the URI handler in Windows as an example
(please note that I have only tested these .reg files in Windows 7/8). If you
wish to apply them, simply edit the reg files to point to whatever SSH client
you wish to use. Our company utilizes SecureCRT, so that is what is currently
set in the reg files I have attached. Alternatives such as PuTTY should work
fine as well, once the .reg files are edited. As a side note, the device.html
can be used to add other application URIs as well. Some ideas that might be use!
ful would be RDP (rdp://) or VNC (vnc://), which would be useful in large
Windows environments. I have tested the patch against netdot 1.0.4 and 1.0.7
without issues.
Additionally, the Microsoft article on registering an Application to a URI
scheme is here, in case someone wants to make their own .reg files rather than
utilize mine:
https://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx
Explanation of files:
device.html.patch - Patch for device.html file under htdocs/management in
netdot directory
createSSHURIHandler.reg - Adds the ssh:// URI handler for SSH (using SecureCRT
application, can use PuTTY if edited)
createTelnetURIHandler.reg - Same as above, but for telnet://
enable32bitIETelnet.reg - Allows the telnet:// URI to work in Internet Explorer
32-bit; this is not dependent on whatever application you use for handling the
URI
enable64bitIETelnet.reg - Same as above, but for IE 64-bit.
<pre>
--- device.html.orig 2015-05-06 12:35:03.937768652 -0700
+++ device.html 2015-05-06 11:37:45.111208330 -0700
@@ -214,6 +214,7 @@
<div class="containerheadleftoutside">
Device: <b><% $fqdn %></b>
<a href="http://<% $fqdn %>" target="#">[HTTP]</a> <a href="https://<% $fqdn
%>" target="#">[HTTPS]</a>
+ <a href="ssh://<% $fqdn %>" target="#">[SSH]</a> <a href="telnet://<% $fqdn
%>" target="#">[Telnet]</a>
</div><!-- close containerheadleftoutside -->
<div class="containerheadrightoutside">
</pre>
--
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: 2
Date: Thu, 7 May 2015 08:20:12 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1858] (Resolved) Device page
shows incorrect "Last Updated" timestamp for devices that cannot be
reached
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1858 has been updated by Carlos Vicente.
Status changed from New to Resolved
Resolution set to fixed
----------------------------------------
Bug #1858: Device page shows incorrect "Last Updated" timestamp for devices
that cannot be reached
https://osl.uoregon.edu/redmine/issues/1858#change-3297
Author: Carlos Vicente
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.8
Resolution: fixed
--
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: 3
Date: Thu, 7 May 2015 11:03:50 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
netdot-1.0.7-14-g6c06762
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".
The branch, master has been updated
via 6c067629f655bd998520c63d41067a1560499a91 (commit)
via 380f71f3a968e76b71075577dd30329d2582e937 (commit)
via bc7307fbdcbd2c55b54866ab5c4db9be9a43d8b7 (commit)
from 684b354b377615639d3e4085db88402544eacbb7 (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 6c067629f655bd998520c63d41067a1560499a91
Author: Carlos Vicente <[email protected]>
Date: Thu May 7 14:03:04 2015 -0400
Fix error when adding the network address to an existing A/AAAA record
diff --git a/lib/Netdot/Model/RRADDR.pm b/lib/Netdot/Model/RRADDR.pm
index afe9202..7bf73f3 100644
--- a/lib/Netdot/Model/RRADDR.pm
+++ b/lib/Netdot/Model/RRADDR.pm
@@ -280,7 +280,6 @@ sub _net_dns {
return $ndo;
}
-
##################################################################
# check if IP is an address string
sub _convert_ipblock {
@@ -288,8 +287,10 @@ sub _convert_ipblock {
if (!(ref $ip) && ($ip =~ /\D/)) {
$ip = $self->rem_lt_sp($ip);
my $ipblock;
- unless ( $ipblock = Ipblock->search(address=>$ip)->first){
- $ipblock = Ipblock->insert({address=>$ip, status=>'Static'});
+ # Make sure that we get end-addresses
+ my $plen = Ipblock->matches_v4($ip) ? '32' : '128';
+ unless ( $ipblock = Ipblock->search(address=>$ip,
prefix=>$plen)->first){
+ $ipblock = Ipblock->insert({address=>$ip, prefix=>$plen,
status=>'Static'});
}
# Make sure it's set to static
$ipblock->update({status=>'Static'})
commit 380f71f3a968e76b71075577dd30329d2582e937
Author: Carlos Vicente <[email protected]>
Date: Thu May 7 11:19:42 2015 -0400
Fix for #1858 (Device page shows incorrect 'Last Updated' timestamp for
devices that cannot be reached)
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 34c58fd..f5e0117 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -2576,7 +2576,9 @@ sub is_in_downtime {
- Validate various arguments
Arguments:
- Hash ref with Device fields
+ Hash ref with:
+ - Device fields
+ - Flag to disable last_updated timestamp
Returns:
See Class::DBI update()
Example:
@@ -2587,8 +2589,11 @@ sub is_in_downtime {
sub update {
my ($self, $argv) = @_;
- # Update the timestamp
- $argv->{last_updated} = $self->timestamp;
+ # Update the timestamp unless we're told not to
+ my $no_tstamp = delete $argv->{no_timestamp};
+ unless ( $no_tstamp ){
+ $argv->{last_updated} = $self->timestamp;
+ }
if ( exists $argv->{snmp_managed} && !($argv->{snmp_managed}) ){
# Means it's being set to 0 or undef
@@ -4109,7 +4114,7 @@ sub _get_snmp_session {
my $max = $self->config->get('MAX_SNMP_CONNECTION_ATTEMPTS');
my $count = $self->snmp_conn_attempts || 0;
$count++;
- $self->update({snmp_conn_attempts=>$count});
+ $self->update({snmp_conn_attempts=>$count, no_timestamp=>1});
$logger->info(sprintf("Device::_get_snmp_session: %s: Failed connection
attempts: %d",
$host, $count));
if ( $max == 0 ){
@@ -4117,7 +4122,7 @@ sub _get_snmp_session {
return;
}
if ( $count >= $max ){
- $self->update({snmp_down=>1});
+ $self->update({snmp_down=>1, no_timestamp=>1});
}
}
-----------------------------------------------------------------------
Summary of changes:
htdocs/reports/device_inventory.html | 64 ++++++++++++++++++++++--------------
lib/Netdot/Model/Device.pm | 30 ++++++++++-------
lib/Netdot/Model/RRADDR.pm | 7 ++--
3 files changed, 62 insertions(+), 39 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
Message: 4
Date: Thu, 7 May 2015 11:04:15 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.7-14-g6c06762
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".
The branch, netdot-1.0 has been updated
via 6c067629f655bd998520c63d41067a1560499a91 (commit)
via 380f71f3a968e76b71075577dd30329d2582e937 (commit)
from bc7307fbdcbd2c55b54866ab5c4db9be9a43d8b7 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
lib/Netdot/Model/Device.pm | 15 ++++++++++-----
lib/Netdot/Model/RRADDR.pm | 7 ++++---
2 files changed, 14 insertions(+), 8 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 98, Issue 5
*******************************************