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 #1776] (In Progress) allow users        to add an
      hostname/overwrite 'discovered' ip addresses (with patch)
      ([email protected])
   2. [Netdot - Feature #1776] allow users to add an
      hostname/overwrite 'discovered' ip addresses (with patch)
      ([email protected])
   3. [Netdot - Feature #1776] allow users to add an
      hostname/overwrite 'discovered' ip addresses (with patch)
      ([email protected])
   4. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-97-g7f79fe1 ([email protected])
   5. [Netdot - Feature #1776] (Resolved) allow users to        add an
      hostname/overwrite 'discovered' ip addresses (with patch)
      ([email protected])
   6. [Netdot - Feature #1758] (Resolved) New fields for        bgppeering
      table ([email protected])
   7. [Netdot - Bug #1741] (Resolved) Nagios host 'alias'       set to
      name of group. Should probably be set to FQDN instead
      ([email protected])
   8. [Netdot - Bug #1760] UTF-8 data retrivied from    database
      breaks UTF-8 content of the page ([email protected])
   9. [Netdot - Bug #1773] (Resolved) no failover support       for
      shared-networks in DHCP ([email protected])
  10. [Netdot - Bug #1772] (Resolved) 4th hextet isn't  visible in
      add_host.html when all zeroes ([email protected])


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

Message: 1
Date: Wed, 2 Oct 2013 12:18:20 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1776] (In Progress) allow
        users   to add an hostname/overwrite 'discovered' ip addresses (with
        patch)
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1776 has been updated by Carlos Vicente.

Category set to UserInterface
Status changed from New to In Progress
Assignee set to Carlos Vicente
Target version set to 1.0.5


----------------------------------------
Feature #1776: allow users to add an hostname/overwrite 'discovered' ip 
addresses (with patch)
https://osl.uoregon.edu/redmine/issues/1776#change-3118

Author: Wim Vandersmissen
Status: In Progress
Priority: Normal
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: 


Via the user_management interface it isn't possible for users to do something 
with 'discovered' IP's.
This is sometimes an issue, because they bring up a (test)server(s) before they 
are added to DNS.

My patch allows them to reuse those IPs and add hostnames in the same way as 
for an 'available' IP.

Needs the follow entry in your Site.conf
# allow users to overwrite 'discovered' entries
USER_DISCOVERED_OVERWRITE => 1,


-- 
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: Wed, 2 Oct 2013 12:29:24 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1776] allow users to add an
        hostname/overwrite 'discovered' ip addresses (with patch)
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1776 has been updated by Carlos Vicente.


Hello Wim,

Just wanted to clarify this line in the RR.pm diff

+                       unless (defined($discovered_overwrite)) {
+                               $class->throw_user("Address $address is not 
available");
+                       }

I'm guessing you meant to say: 

+                       unless ($discovered_overwrite) {
+                               $class->throw_user("Address $address is not 
available");
+                       }

Because defined() returns true even if the value is 0, and the intention is not 
to allow the allocation if the config flag is off, correct?

cv


Wim Vandersmissen wrote:
> Via the user_management interface it isn't possible for users to do something 
> with 'discovered' IP's.
> This is sometimes an issue, because they bring up a (test)server(s) before 
> they are added to DNS.
> 
> My patch allows them to reuse those IPs and add hostnames in the same way as 
> for an 'available' IP.
> 
> Needs the follow entry in your Site.conf
> # allow users to overwrite 'discovered' entries
> USER_DISCOVERED_OVERWRITE => 1,


----------------------------------------
Feature #1776: allow users to add an hostname/overwrite 'discovered' ip 
addresses (with patch)
https://osl.uoregon.edu/redmine/issues/1776#change-3119

Author: Wim Vandersmissen
Status: In Progress
Priority: Normal
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: 


Via the user_management interface it isn't possible for users to do something 
with 'discovered' IP's.
This is sometimes an issue, because they bring up a (test)server(s) before they 
are added to DNS.

My patch allows them to reuse those IPs and add hostnames in the same way as 
for an 'available' IP.

Needs the follow entry in your Site.conf
# allow users to overwrite 'discovered' entries
USER_DISCOVERED_OVERWRITE => 1,


-- 
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, 3 Oct 2013 02:10:05 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1776] allow users to add an
        hostname/overwrite 'discovered' ip addresses (with patch)
To: [email protected], [email protected],
        [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1776 has been updated by Wim Vandersmissen.


Carlos,

Yes, you're correct. The 'defined' was a restant from my original test which 
didn't have a config option at that time.
----------------------------------------
Feature #1776: allow users to add an hostname/overwrite 'discovered' ip 
addresses (with patch)
https://osl.uoregon.edu/redmine/issues/1776#change-3120

Author: Wim Vandersmissen
Status: In Progress
Priority: Normal
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: 


Via the user_management interface it isn't possible for users to do something 
with 'discovered' IP's.
This is sometimes an issue, because they bring up a (test)server(s) before they 
are added to DNS.

My patch allows them to reuse those IPs and add hostnames in the same way as 
for an 'available' IP.

Needs the follow entry in your Site.conf
# allow users to overwrite 'discovered' entries
USER_DISCOVERED_OVERWRITE => 1,


-- 
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: Thu, 3 Oct 2013 08:09:21 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-97-g7f79fe1
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  7f79fe1a93de5c3ff2ed2fb7f7589532a64dc186 (commit)
      from  b41c636d7adaccd7a10769104fdcee85ab5648f4 (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 7f79fe1a93de5c3ff2ed2fb7f7589532a64dc186
Author: Carlos Vicente <[email protected]>
Date:   Thu Oct 3 11:09:10 2013 -0400

    Feature #1776 (allow users to add an hostname/overwrite 'discovered' ip 
addresses)

diff --git a/etc/Default.conf b/etc/Default.conf
index 7419ed2..fbb6b65 100644
--- a/etc/Default.conf
+++ b/etc/Default.conf
@@ -97,6 +97,10 @@ IPV6_ADDRESS_USER_ENTRY_HOST_ONLY => 1,
 # if you do not wish to record such activity
 AUDIT_USER_ACTIVITY => 1,
 
+# Allow users to overwrite 'discovered' IP entries
+USER_DISCOVERED_OVERWRITE => 1,
+
+
 #################################################################
 #
 # Database setup
diff --git a/htdocs/management/subnet.mhtml b/htdocs/management/subnet.mhtml
index d6b07fe..ca54707 100644
--- a/htdocs/management/subnet.mhtml
+++ b/htdocs/management/subnet.mhtml
@@ -26,6 +26,8 @@ my $make_cell = sub {
        @argv{'caller', 'id', 'addr', 'disp_addr', 'divtitle', 'divclass', 
              'priv_user', 'can_edit', 'can_choose', 'subnet_id', 'used'};
 
+    our $DISCOVERED_OVERWRITE;
+
     my $str = $disp_addr;
     if ( $caller eq 'choose_ip.html' ){
        # Called as a popup window
@@ -50,6 +52,16 @@ my $make_cell = sub {
                }
            }elsif ( $divclass eq 'ipaddr_static' || $priv_user ){
                $str = '<a href="'.$comp.'?id='.$id.'" 
class="ipaddr">'.$str.'</a>';
+               
+           }elsif ( $DISCOVERED_OVERWRITE && ($divclass eq 
'ipaddr_discovered') ) {
+               if ( $priv_user && $can_edit ){
+                   # User is either admin or operator with edit rights
+                   $str = '<a href="'.$comp.'?id='.$id.'" 
class="ipaddr">'.$str.'</a>';
+               }elsif ( $can_choose ){
+                   # User is regular user, but has choose_ip rights
+                   $str = '<a 
href="../user_management/add_host.html?address='.$addr.
+                       '&add_host_block='.$subnet_id.'" 
class="ipaddr">'.$str.'</a>';
+               }
            }
        }else{
            if ( $priv_user && $can_edit ){
@@ -71,6 +83,8 @@ my $make_cell = sub {
 <%init>
 
 my $BLOCK_MAX = Netdot->config->get('SUBNET_BLOCK_VIEW_MAX_PREFIX');
+our $DISCOVERED_OVERWRITE = Netdot->config->get('USER_DISCOVERED_OVERWRITE');
+
 if ( $network->version == 4 && $network->prefix < $BLOCK_MAX ){
     print "This subnet is too big for the block view";
     $m->abort;
diff --git a/lib/Netdot/Model/RR.pm b/lib/Netdot/Model/RR.pm
index 0dde75b..1bfd32d 100644
--- a/lib/Netdot/Model/RR.pm
+++ b/lib/Netdot/Model/RR.pm
@@ -490,7 +490,13 @@ sub add_host {
            if ( my $ipb = Ipblock->search(address=>$address, 
                                           prefix=>$prefix)->first ){
                if ( $ipb->status->name ne 'Available' ){
-                   $class->throw_user("Address $address is not available");
+                   if ($ipb->status->name eq 'Discovered') {
+                       my $discovered_overwrite = 
Netdot->config->get("USER_DISCOVERED_OVERWRITE");
+                       $class->throw_user("Address $address is not available")
+                           unless ($discovered_overwrite);
+                   } else {
+                       $class->throw_user("Address $address is not available");
+                   }
                }
            }
 

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

Summary of changes:
 etc/Default.conf               |    4 ++++
 htdocs/management/subnet.mhtml |   14 ++++++++++++++
 lib/Netdot/Model/RR.pm         |    8 +++++++-
 3 files changed, 25 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Netdot


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

Message: 5
Date: Thu, 3 Oct 2013 08:09:59 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1776] (Resolved) allow
        users to        add an hostname/overwrite 'discovered' ip addresses 
(with
        patch)
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1776 has been updated by Carlos Vicente.

Status changed from In Progress to Resolved
Resolution set to fixed


----------------------------------------
Feature #1776: allow users to add an hostname/overwrite 'discovered' ip 
addresses (with patch)
https://osl.uoregon.edu/redmine/issues/1776#change-3121

Author: Wim Vandersmissen
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: fixed


Via the user_management interface it isn't possible for users to do something 
with 'discovered' IP's.
This is sometimes an issue, because they bring up a (test)server(s) before they 
are added to DNS.

My patch allows them to reuse those IPs and add hostnames in the same way as 
for an 'available' IP.

Needs the follow entry in your Site.conf
# allow users to overwrite 'discovered' entries
USER_DISCOVERED_OVERWRITE => 1,


-- 
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: 6
Date: Thu, 3 Oct 2013 09:23:42 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1758] (Resolved) New fields
        for     bgppeering table
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1758 has been updated by Carlos Vicente.

Category set to DeviceManagement
Status changed from New to Resolved
Target version changed from 1.0.6 to 1.0.5
Resolution set to fixed


----------------------------------------
Feature #1758: New fields for bgppeering table
https://osl.uoregon.edu/redmine/issues/1758#change-3122

Author: Carlos Vicente
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.5
Resolution: fixed


- Change "monitoredstatus" to "state" to hold the values from the MIB:

<pre>
    bgpPeerState OBJECT-TYPE
        SYNTAX     INTEGER {
                            idle(1),
                            connect(2),
                            active(3),
                            opensent(4),
                            openconfirm(5),
                            established(6)
                   }

</pre>

- Add 'last_changed' timestamp field
- Add 'type' (peer, transit, customer)
- peer_group varchar


-- 
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: 7
Date: Thu, 3 Oct 2013 09:25:11 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1741] (Resolved) Nagios host
        'alias' set to name of group. Should probably be set to FQDN instead
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1741 has been updated by Carlos Vicente.

Category set to DeviceManagement
Status changed from New to Resolved
Resolution set to fixed


----------------------------------------
Bug #1741: Nagios host 'alias' set to name of group. Should probably be set to 
FQDN instead
https://osl.uoregon.edu/redmine/issues/1741#change-3123

Author: Carlos Vicente
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.5
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: 8
Date: Thu, 3 Oct 2013 09:31:13 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1760] UTF-8 data retrivied from
        database breaks UTF-8 content of the page
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1760 has been updated by Carlos Vicente.


Hello Andrew,

So to clarify, you have added "use utf8" to every Mason component? Was it in 
the <%init> section?

Also, can you specify with more precision where you added the two 
Encode::decode_utf8() statements?

Thanks,

cv

Andrew Kornilov wrote:
> I removed all Encode::encode_utf8, put everywhere "use utf8" and added two 
> Encode::decode_utf8 (it was needed for $title in dhandler and 
> htdocs/generic/attribute_table.mhtml for $field_headers[$pos]).
> 
> Now everything seems to be working correct.


----------------------------------------
Bug #1760: UTF-8 data retrivied from database breaks UTF-8 content of the page
https://osl.uoregon.edu/redmine/issues/1760#change-3124

Author: Andrew Kornilov
Status: New
Priority: Normal
Assignee: 
Category: Netdot
Target version: 1.0.5
Resolution: 


Hi there,

We like Netdot very much and want it to be used all around the world. There are 
many small ISP companies (and we are one of them) in Russia and they can't use 
Netdot with English language. Unfortunately, Netdot doesn't provide anything 
like GNU gettext support so we had to start translation right inside the code 
and page templates. Furthermore, all our sites, cables, addresses and so on are 
in Russian.

Unfortunately, we've found some strange problems: some pages are displayed like 
double UTF8 encoded.  
Here is the example how it looks like: http://imagebin.org/259678

After discovering i found that this happens in this block of code:

htdocs/cable_plant/autohandler (lines 180-184):

                    <%perl>
                    foreach my $site (@sites) {
                        printf("<option value=\"%s\">%s</option>\n", $site->id, 
$site->name);
                    }
                    </%perl>

Next step showed that removing Russian site names from output solves the 
problem, now it looks like this:
http://imagebin.org/259680

I tried to UTF8 encode retrieved data:

my $site_name = Encode::encode_utf8($site->name);
printf("<option value=\"%s\">%s</option>\n", $site->id, $site_name);

and that solved the problem!

That happens on every page that uses data retrieved from database. So it seems 
that Netdot doesn't encode data from database to UTF8 and outputs it in way 
that breaks the page.

Could you please take a look into the database code and find what causes that?  
We do not want to UTF8-encode each data in every HTML template and so on, so 
it's better to make some changes to DB util code to make it work everywhere.

Thank you in advance.

P.S. We use GIT, track last changes of the original Netdot, patch it with 
Russian lagnuange and publish it so everyone can use it.  


-- 
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: 9
Date: Thu, 3 Oct 2013 09:49:54 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1773] (Resolved) no failover
        support for shared-networks in DHCP
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1773 has been updated by Carlos Vicente.

Category set to DHCP
Status changed from New to Resolved
Assignee set to Carlos Vicente
Target version set to 1.0.5
Resolution set to fixed


----------------------------------------
Bug #1773: no failover support for shared-networks in DHCP
https://osl.uoregon.edu/redmine/issues/1773#change-3125

Author: Wim Vandersmissen
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: DHCP
Target version: 1.0.5
Resolution: fixed


no failover support for shared-networks in DHCP

attached patch fixes this


-- 
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: Thu, 3 Oct 2013 09:56:13 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1772] (Resolved) 4th hextet
        isn't   visible in add_host.html when all zeroes
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1772 has been updated by Carlos Vicente.

Category set to UserInterface
Status changed from New to Resolved
Assignee set to Carlos Vicente
Target version set to 1.0.5
Resolution set to fixed


----------------------------------------
Bug #1772: 4th hextet isn't visible in add_host.html when all zeroes
https://osl.uoregon.edu/redmine/issues/1772#change-3126

Author: Wim Vandersmissen
Status: Resolved
Priority: Normal
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: fixed


When you want to add a new ipv6 host in the range 2001:0db8:1234::/64 it will 
only show  2001:0db8:1234: instead of 2001:0db8:1234:0: in add_host.html

Adding the host will give an invalid address error.

Attached patch fixes it.


-- 
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 79, Issue 4
*******************************************

Reply via email to