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 - Bug #1661] (New) Error: Value for field 'name' (max
64) is too long during device import/update ([email protected])
2. [Netdot - Bug #1661] Error: Value for field 'name' (max 64)
is too long during device import/update ([email protected])
3. [Netdot - Bug #1662] (New) Support for staging dir
([email protected])
4. [Netdot - Bug #1662] Support for staging dir
([email protected])
5. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-17-g076858e (Apache)
6. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-18-g6d3b263 (Apache)
7. [Netdot - Bug #1657] (Resolved) Cannot manually set Device
Product ([email protected])
8. [SCM] Netdot Git repository branch netdot-1.0 updated.
netdot-1.0.1-RC3-19-g095e62f (Apache)
9. [Netdot - Bug #1661] (Resolved) Error: Value for field 'name'
(max 64) is too long during device import/update
([email protected])
10. [Netdot - Bug #1662] Support for staging dir
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Jul 2012 13:50:43 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1661] (New) Error: Value for
field 'name' (max 64) is too long during device import/update
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1661 has been reported by Vitaly Nikolaev.
----------------------------------------
Bug #1661: Error: Value for field 'name' (max 64) is too long during device
import/update
https://osl.uoregon.edu/redmine/issues/1661
Author: Vitaly Nikolaev
Status: New
Priority: High
Assignee:
Category: DeviceManagement
Target version: 1.0.1-RC3
Resolution:
updatedevice.html produced the following error:
Value for field 'name' (max 64) is too long: 'FIBERNOC Route servers. Route
servers provide neighbor AS 1st hop (19996)'
Please go back and try again.
Looks like problem in IRR for AS 19996
http://bgp.he.net/AS19996#_irr
I run 1.0.1 RC3
Would be great to have workaround.
Thank you
--
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, 19 Jul 2012 14:10:21 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1661] Error: Value for field
'name' (max 64) is too long during device import/update
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1661 has been updated by Vitaly Nikolaev.
File patch1661 added
Found workaround.
see patch attached.
Probably it is a bad way, but easiest.
----------------------------------------
Bug #1661: Error: Value for field 'name' (max 64) is too long during device
import/update
https://osl.uoregon.edu/redmine/issues/1661
Author: Vitaly Nikolaev
Status: New
Priority: High
Assignee:
Category: DeviceManagement
Target version: 1.0.1-RC3
Resolution:
updatedevice.html produced the following error:
Value for field 'name' (max 64) is too long: 'FIBERNOC Route servers. Route
servers provide neighbor AS 1st hop (19996)'
Please go back and try again.
Looks like problem in IRR for AS 19996
http://bgp.he.net/AS19996#_irr
I run 1.0.1 RC3
Would be great to have workaround.
Thank you
--
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: Fri, 20 Jul 2012 06:43:36 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1662] (New) Support for staging
dir
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1662 has been reported by Francesco Colista.
----------------------------------------
Bug #1662: Support for staging dir
https://osl.uoregon.edu/redmine/issues/1662
Author: Francesco Colista
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
Hi. I'm trying to compile netdot for Alpine Linux (www.alpinelinux.org).
Netdot actually does not support staging dir, so when the package is created
the substitution of PREFIX uses the full path.
This cause an extensive patching in order to remove the unneeded path.
Would be possible to include the possibility to install netdot in a temp dir,
in the upstream?
This is a patch for Makefile:
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
--- ./Makefile.orig
+++ ./Makefile
@@ -91,14 +91,14 @@
@echo "Creating necessary directories..."
echo $(PREFIX) > ./.prefix
for dir in $(DIR); do \
- if test -d $(PREFIX)/$$dir; then \
- echo "Skipping dir $(PREFIX)/$$dir; already exists"; \
+ if test -d $(DESTDIR)$(PREFIX)/$$dir; then \
+ echo "Skipping dir $(DESTDIR)$(PREFIX)/$$dir; already exists"; \
else \
- mkdir -m $(DMOD) -p $(PREFIX)/$$dir ; \
+ mkdir -m $(DMOD) -p $(DESTDIR)$(PREFIX)/$$dir ; \
fi ; \
done
- chown -R $(APACHEUSER):$(APACHEGROUP) $(PREFIX)/tmp
- chmod 750 $(PREFIX)/tmp
+ chown -R $(APACHEUSER):$(APACHEGROUP) $(DESTDIR)$(PREFIX)/tmp
+ chmod 750 $(DESTDIR)$(PREFIX)/tmp
htdocs:
cd $@ ; $(MAKE) all DIR=$@
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
Thanks.
--
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: Fri, 20 Jul 2012 06:46:44 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1662] Support for staging dir
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1662 has been updated by Francesco Colista.
File support-staging-dir.patch added
Sorry for the wrong formatting. In attach the makefile.
----------------------------------------
Bug #1662: Support for staging dir
https://osl.uoregon.edu/redmine/issues/1662
Author: Francesco Colista
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
Hi. I'm trying to compile netdot for Alpine Linux (www.alpinelinux.org).
Netdot actually does not support staging dir, so when the package is created
the substitution of PREFIX uses the full path.
This cause an extensive patching in order to remove the unneeded path.
Would be possible to include the possibility to install netdot in a temp dir,
in the upstream?
This is a patch for Makefile:
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
--- ./Makefile.orig
+++ ./Makefile
@@ -91,14 +91,14 @@
@echo "Creating necessary directories..."
echo $(PREFIX) > ./.prefix
for dir in $(DIR); do \
- if test -d $(PREFIX)/$$dir; then \
- echo "Skipping dir $(PREFIX)/$$dir; already exists"; \
+ if test -d $(DESTDIR)$(PREFIX)/$$dir; then \
+ echo "Skipping dir $(DESTDIR)$(PREFIX)/$$dir; already exists"; \
else \
- mkdir -m $(DMOD) -p $(PREFIX)/$$dir ; \
+ mkdir -m $(DMOD) -p $(DESTDIR)$(PREFIX)/$$dir ; \
fi ; \
done
- chown -R $(APACHEUSER):$(APACHEGROUP) $(PREFIX)/tmp
- chmod 750 $(PREFIX)/tmp
+ chown -R $(APACHEUSER):$(APACHEGROUP) $(DESTDIR)$(PREFIX)/tmp
+ chmod 750 $(DESTDIR)$(PREFIX)/tmp
htdocs:
cd $@ ; $(MAKE) all DIR=$@
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
Thanks.
--
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: Fri, 20 Jul 2012 10:25:50 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-17-g076858e
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 076858e6d643213587d7f39409ac00e71e6929eb (commit)
from 78f29224640a29cb8685ff7ebf450d85024c0997 (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 076858e6d643213587d7f39409ac00e71e6929eb
Author: Carlos Vicente <[email protected]>
Date: Fri Jul 20 13:25:23 2012 -0400
Correction in on_delete actions
diff --git a/etc/netdot.meta b/etc/netdot.meta
index 545ad2d..a547b21 100644
--- a/etc/netdot.meta
+++ b/etc/netdot.meta
@@ -1621,7 +1621,7 @@ $meta = {
description => 'The list or group of Contacts to which this Contact
belongs',
length => '',
linksto => {
- cascade => 'Nullify',
+ cascade => 'Delete',
method => 'contacts',
table => 'ContactList'
},
@@ -2800,7 +2800,7 @@ $meta = {
description => '',
length => '',
linksto => {
- cascade => 'Nullify',
+ cascade => 'Delete',
method => 'devices',
table => 'ContactList'
},
-----------------------------------------------------------------------
Summary of changes:
etc/netdot.meta | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 6
Date: Fri, 20 Jul 2012 10:41:20 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-18-g6d3b263
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 6d3b2637f0cbf4bf17224373bc2bba0041a21e52 (commit)
from 076858e6d643213587d7f39409ac00e71e6929eb (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 6d3b2637f0cbf4bf17224373bc2bba0041a21e52
Author: Carlos Vicente <[email protected]>
Date: Fri Jul 20 13:40:52 2012 -0400
Fix for #1657 (Cannot manually set Device Product)
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 5a31daf..bfdec33 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -2783,9 +2783,7 @@ sub info_update {
##############################################################
# Asset
- my $dev_product = $self->_assign_product($info);
my %asset_args = (
- product_id => $dev_product->id,
serial_number => $info->{serial_number},
physaddr => $self->_assign_base_mac($info) || undef,
reserved_for => "", # needs to be cleared when device gets installed
@@ -2798,11 +2796,15 @@ sub info_update {
push(@where, { physaddr => $asset_args{physaddr} })
if $asset_args{physaddr};
my $asset = Asset->search_where(\@where)->first if @where;
+ my $dev_product;
if ( $asset ){
# Make sure that the data is complete with the latest info we got
$asset->update(\%asset_args);
+ $dev_product = $asset->product_id;
}elsif ( $asset_args{serial_number} || $asset_args{physaddr} ){
- $asset = Asset->insert(\%asset_args);
+ $dev_product = $self->_assign_product($info);
+ $asset_args{product_id} = $dev_product->id;
+ $asset = Asset->insert(\%asset_args);
}
$devtmp{asset_id} = $asset->id if $asset;
-----------------------------------------------------------------------
Summary of changes:
lib/Netdot/Model/Device.pm | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 7
Date: Fri, 20 Jul 2012 10:41:45 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1657] (Resolved) 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 updated by Carlos Vicente.
Status changed from New to Resolved
Assignee set to Carlos Vicente
Target version set to 1.0.1
Resolution set to fixed
Thank you!
----------------------------------------
Bug #1657: Cannot manually set Device Product
https://osl.uoregon.edu/redmine/issues/1657
Author: Matej Vadnjal
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.1
Resolution: fixed
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: 8
Date: Fri, 20 Jul 2012 10:56:26 -0700
From: Apache <[email protected]>
Subject: [Netdot-devel] [SCM] Netdot Git repository branch netdot-1.0
updated. netdot-1.0.1-RC3-19-g095e62f
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 095e62f86d4faa156032d64ab231d1840fc3ab39 (commit)
from 6d3b2637f0cbf4bf17224373bc2bba0041a21e52 (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 095e62f86d4faa156032d64ab231d1840fc3ab39
Author: Carlos Vicente <[email protected]>
Date: Fri Jul 20 13:55:55 2012 -0400
Fix for #1661 (Value for field 'name' (max 64) is too long during device
import/update)
diff --git a/etc/netdot.meta b/etc/netdot.meta
index a547b21..944bb5b 100644
--- a/etc/netdot.meta
+++ b/etc/netdot.meta
@@ -3418,7 +3418,7 @@ $meta = {
name => {
default => '',
description => 'Name of this Entity',
- length => '64',
+ length => '128',
nullable => 0,
tag => 'Name',
type => 'varchar'
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index bfdec33..cecf4ee 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -4886,13 +4886,15 @@ sub _get_as_info{
}
$i->disconnect();
- if ( $obj =~ /as-name:\s+(.*)\n/ ){
+ if ( $obj =~ /as-name:\s+(.*)\n/o ){
my $as_name = $1;
+ $as_name = substr($as_name, 0, 32);
$results{asname} = $as_name;
$logger->debug(sub{"Device::_get_as_info:: $server: Found asname:
$as_name"});
}
- if ( $obj =~ /descr:\s+(.*)\n/ ){
+ if ( $obj =~ /descr:\s+(.*)\n/o ){
my $descr = $1;
+ $descr = substr($descr, 0, 128);
$results{orgname} = $descr;
$logger->debug(sub{"Device::_get_as_info:: $server: Found orgname:
$descr"});
}
diff --git a/upgrade/updatedb b/upgrade/updatedb
index f563cfc..9c0c6a4 100644
--- a/upgrade/updatedb
+++ b/upgrade/updatedb
@@ -313,6 +313,8 @@ push @statements, (
"ALTER TABLE dhcpscope ADD COLUMN version integer;",
"ALTER TABLE entity ADD COLUMN config_type varchar(255);",
"ALTER TABLE entity_history ADD COLUMN config_type varchar(255);",
+ "ALTER TABLE entity MODIFY COLUMN name varchar(128);",
+ "ALTER TABLE entity_history MODIFY COLUMN name varchar(128);",
"ALTER TABLE product ADD COLUMN part_number varchar(255);",
"ALTER TABLE product ADD COLUMN config_type varchar(255);",
"ALTER TABLE product_history ADD COLUMN part_number varchar(255);",
-----------------------------------------------------------------------
Summary of changes:
etc/netdot.meta | 2 +-
lib/Netdot/Model/Device.pm | 6 ++++--
upgrade/updatedb | 2 ++
3 files changed, 7 insertions(+), 3 deletions(-)
hooks/post-receive
--
Netdot Git repository
------------------------------
Message: 9
Date: Fri, 20 Jul 2012 10:57:16 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1661] (Resolved) Error: Value
for field 'name' (max 64) is too long during device import/update
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1661 has been updated by Carlos Vicente.
Status changed from New to Resolved
Assignee set to Carlos Vicente
Target version changed from 1.0.1-RC3 to 1.0.1
Resolution set to fixed
Thank you. I also expanded the Entity name column to 128 characters.
----------------------------------------
Bug #1661: Error: Value for field 'name' (max 64) is too long during device
import/update
https://osl.uoregon.edu/redmine/issues/1661
Author: Vitaly Nikolaev
Status: Resolved
Priority: High
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.1
Resolution: fixed
updatedevice.html produced the following error:
Value for field 'name' (max 64) is too long: 'FIBERNOC Route servers. Route
servers provide neighbor AS 1st hop (19996)'
Please go back and try again.
Looks like problem in IRR for AS 19996
http://bgp.he.net/AS19996#_irr
I run 1.0.1 RC3
Would be great to have workaround.
Thank you
--
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: 10
Date: Fri, 20 Jul 2012 11:09:11 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1662] Support for staging dir
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1662 has been updated by Carlos Vicente.
Hello Francesco,
Before I look into this more carefully, which package are you using? Perhaps
the latest stable (0.9.10)?
I'm not working on that branch anymore. I received a similar suggestion on
issue #1578 which was applied towards 1.0.1. Does it achieve what you need?
Thanks.
cv
----------------------------------------
Bug #1662: Support for staging dir
https://osl.uoregon.edu/redmine/issues/1662
Author: Francesco Colista
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
Hi. I'm trying to compile netdot for Alpine Linux (www.alpinelinux.org).
Netdot actually does not support staging dir, so when the package is created
the substitution of PREFIX uses the full path.
This cause an extensive patching in order to remove the unneeded path.
Would be possible to include the possibility to install netdot in a temp dir,
in the upstream?
This is a patch for Makefile:
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
--- ./Makefile.orig
+++ ./Makefile
@@ -91,14 +91,14 @@
@echo "Creating necessary directories..."
echo $(PREFIX) > ./.prefix
for dir in $(DIR); do \
- if test -d $(PREFIX)/$$dir; then \
- echo "Skipping dir $(PREFIX)/$$dir; already exists"; \
+ if test -d $(DESTDIR)$(PREFIX)/$$dir; then \
+ echo "Skipping dir $(DESTDIR)$(PREFIX)/$$dir; already exists"; \
else \
- mkdir -m $(DMOD) -p $(PREFIX)/$$dir ; \
+ mkdir -m $(DMOD) -p $(DESTDIR)$(PREFIX)/$$dir ; \
fi ; \
done
- chown -R $(APACHEUSER):$(APACHEGROUP) $(PREFIX)/tmp
- chmod 750 $(PREFIX)/tmp
+ chown -R $(APACHEUSER):$(APACHEGROUP) $(DESTDIR)$(PREFIX)/tmp
+ chmod 750 $(DESTDIR)$(PREFIX)/tmp
htdocs:
cd $@ ; $(MAKE) all DIR=$@
---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<
Thanks.
--
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
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 64, Issue 18
********************************************