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

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-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 Netdot-users digest..."


Today's Topics:

   1. Re: Updating Device Names (Chip Pleasants)
   2. Re: Updating Device Names (Carlos Vicente)
   3. Re: Updating Device Names (Chip Pleasants)


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

Message: 1
Date: Tue, 4 Mar 2014 08:49:34 -0500
From: Chip Pleasants <[email protected]>
Subject: Re: [Netdot-users] Updating Device Names
To: [email protected]
Message-ID:
        <CAJq5ATrUdqksAVaa4rs3XVP8=rxsagq4akla79qfgdu2mvq...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I corrected some of the duplicates error entries and ran that code again on
a test database. It didn't turn out how I thought it would.  It looks like
it added the sysname to the existing suffix of the name. So its like
host.newdomain.net.olddomain.com. If I delete the device and re-discovering
again will change/remove/modify any of the IP Static, IP Reservations, or
remove any of the existing IP blocks will it? We've added some manual IP
Static entries therefore I don't want to delete any of the IP Blocks that
are already existing.  Any thoughts?  Thanks again for any feedback.

-Chip



On Mon, Mar 3, 2014 at 11:44 AM, Chip Pleasants <[email protected]>wrote:

> I think I made some progress.  I came up with this error when running it
> in a script.
>
> ERROR 1062 (23000) at line 1: Duplicate entry '4-CMH1-EXT-F01' for key
> 'rr1'
>
> This is one of our firewalls that does not have a dns suffix. Apparently I
> was incorrect when reporting all of my SysNames are accurate. Anyway to
> account for SysNames not having a suffix?
>
> -Chip
>
>
>
> On Mon, Mar 3, 2014 at 11:14 AM, Chip Pleasants <[email protected]>wrote:
>
>> Hi Carlos,
>>
>> Thanks for responding and sorry for these beginner SQL questions.  Do I
>> use Netdot's web interface or is more of a command line or SQL script. I
>> adding your sql commands to a script and tried to add it to the netdot db
>> but it didn't look like it did anything.  When I added it to the text file
>> for a command it didn't like the '' characters.  I used single quotes in
>> replace ' ' .
>>
>> -Chip
>>
>>
>> mysql -u root -p
>> mysql netdot < change-device-name.sql
>>
>> change-device-name.sql
>>
>> UPDATE device, rr SET rr.name=device.sysname
>> WHERE device.name = rr.id
>>       AND device.sysname is not NULL
>>      AND device.sysname != '';
>>
>>
>>
>>
>>
>>
>> On Mon, Mar 3, 2014 at 9:43 AM, Carlos Vicente <[email protected]>wrote:
>>
>>> Chip,
>>>
>>> There is no need to delete all devices.
>>>
>>> You can probably accomplish this with a simple SQL query. Something like:
>>>
>>> UPDATE device, rr SET rr.name=device.sysname
>>> WHERE device.name = rr.id
>>>       AND device.sysname is not NULL
>>>      AND device.sysname != '';
>>>
>>> cv
>>>
>>> On Mar 3, 2014, at 9:31 AM, Chip Pleasants <[email protected]> wrote:
>>>
>>> > What's the best way to update the devices names in NetDot?  I'm
>>> changing the dns suffixes for my devices and would like to reflect the new
>>> suffix and delete the only one in Netdot. Should I delete the devices and
>>> rescan or is there a faster safer way? I don't want to blow away any Static
>>> or Reserved addresses.  I have about 1000 devices so manually would take
>>> far too long. The System Names should be the new name today, so if there is
>>> some way to use the System Name that would be great. Thanks in advance for
>>> any assistance.
>>> >
>>> > Thanks,
>>> > Chip
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Netdot-users mailing list
>>> > [email protected]
>>> > https://osl.uoregon.edu/mailman/listinfo/netdot-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140304/628daaf4/attachment-0001.html
 

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

Message: 2
Date: Tue, 4 Mar 2014 09:15:57 -0500
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] Updating Device Names
To: Chip Pleasants <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

I see, the SQL I sent did not take into account a change in the domain name. 
That?s in the zone table.

You?ll need to write some Perl code that uses the Netdot libraries and does the 
right thing (modify the name and domain). 

On the other hand, if you delete all your devices, only the static IP addresses 
associated with those devices will be deleted. The subnets, containers and 
other reserved addresses will not be removed.

cv

On Mar 4, 2014, at 8:49 AM, Chip Pleasants <[email protected]> wrote:

> I corrected some of the duplicates error entries and ran that code again on a 
> test database. It didn't turn out how I thought it would.  It looks like it 
> added the sysname to the existing suffix of the name. So its like 
> host.newdomain.net.olddomain.com. If I delete the device and re-discovering 
> again will change/remove/modify any of the IP Static, IP Reservations, or 
> remove any of the existing IP blocks will it? We've added some manual IP 
> Static entries therefore I don't want to delete any of the IP Blocks that are 
> already existing.  Any thoughts?  Thanks again for any feedback.
> 
> -Chip
> 
> 
> 
> On Mon, Mar 3, 2014 at 11:44 AM, Chip Pleasants <[email protected]> wrote:
> I think I made some progress.  I came up with this error when running it in a 
> script.
> 
> ERROR 1062 (23000) at line 1: Duplicate entry '4-CMH1-EXT-F01' for key 'rr1'
> 
> This is one of our firewalls that does not have a dns suffix. Apparently I 
> was incorrect when reporting all of my SysNames are accurate. Anyway to 
> account for SysNames not having a suffix?
>   
> -Chip
> 
> 
> 
> On Mon, Mar 3, 2014 at 11:14 AM, Chip Pleasants <[email protected]> wrote:
> Hi Carlos,
> 
> Thanks for responding and sorry for these beginner SQL questions.  Do I use 
> Netdot's web interface or is more of a command line or SQL script. I adding 
> your sql commands to a script and tried to add it to the netdot db but it 
> didn't look like it did anything.  When I added it to the text file for a 
> command it didn't like the ?? characters.  I used single quotes in replace ' 
> ' . 
> 
> -Chip
> 
> 
> mysql -u root -p 
> mysql netdot < change-device-name.sql
> 
> change-device-name.sql
> 
> UPDATE device, rr SET rr.name=device.sysname
> WHERE device.name = rr.id
>       AND device.sysname is not NULL
>      AND device.sysname != '';
> 
> 
> 
>      
> 
> 
> On Mon, Mar 3, 2014 at 9:43 AM, Carlos Vicente <[email protected]> wrote:
> Chip,
> 
> There is no need to delete all devices.
> 
> You can probably accomplish this with a simple SQL query. Something like:
> 
> UPDATE device, rr SET rr.name=device.sysname
> WHERE device.name = rr.id
>       AND device.sysname is not NULL
>      AND device.sysname != ??;
> 
> cv
> 
> On Mar 3, 2014, at 9:31 AM, Chip Pleasants <[email protected]> wrote:
> 
> > What's the best way to update the devices names in NetDot?  I'm changing 
> > the dns suffixes for my devices and would like to reflect the new suffix 
> > and delete the only one in Netdot. Should I delete the devices and rescan 
> > or is there a faster safer way? I don't want to blow away any Static or 
> > Reserved addresses.  I have about 1000 devices so manually would take far 
> > too long. The System Names should be the new name today, so if there is 
> > some way to use the System Name that would be great. Thanks in advance for 
> > any assistance.
> >
> > Thanks,
> > Chip
> >
> >
> >
> > _______________________________________________
> > Netdot-users mailing list
> > [email protected]
> > https://osl.uoregon.edu/mailman/listinfo/netdot-users
> 
> 
> 
> 
> _______________________________________________
> Netdot-users mailing list
> [email protected]
> https://osl.uoregon.edu/mailman/listinfo/netdot-users




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

Message: 3
Date: Tue, 4 Mar 2014 09:35:43 -0500
From: Chip Pleasants <[email protected]>
Subject: Re: [Netdot-users] Updating Device Names
To: Carlos Vicente <[email protected]>
Cc: [email protected]
Message-ID:
        <CAJq5ATrEBOP5h=xRfkH=-7qb6dxorw9phca5u2aei_or-hb...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Ok.  I'll probably go with option 2.  My perl coding sucks.  Thank you for
assisting!

-Chip



On Tue, Mar 4, 2014 at 9:15 AM, Carlos Vicente <[email protected]>wrote:

> I see, the SQL I sent did not take into account a change in the domain
> name. That's in the zone table.
>
> You'll need to write some Perl code that uses the Netdot libraries and
> does the right thing (modify the name and domain).
>
> On the other hand, if you delete all your devices, only the static IP
> addresses associated with those devices will be deleted. The subnets,
> containers and other reserved addresses will not be removed.
>
> cv
>
> On Mar 4, 2014, at 8:49 AM, Chip Pleasants <[email protected]> wrote:
>
> > I corrected some of the duplicates error entries and ran that code again
> on a test database. It didn't turn out how I thought it would.  It looks
> like it added the sysname to the existing suffix of the name. So its like
> host.newdomain.net.olddomain.com. If I delete the device and
> re-discovering again will change/remove/modify any of the IP Static, IP
> Reservations, or remove any of the existing IP blocks will it? We've added
> some manual IP Static entries therefore I don't want to delete any of the
> IP Blocks that are already existing.  Any thoughts?  Thanks again for any
> feedback.
> >
> > -Chip
> >
> >
> >
> > On Mon, Mar 3, 2014 at 11:44 AM, Chip Pleasants <[email protected]>
> wrote:
> > I think I made some progress.  I came up with this error when running it
> in a script.
> >
> > ERROR 1062 (23000) at line 1: Duplicate entry '4-CMH1-EXT-F01' for key
> 'rr1'
> >
> > This is one of our firewalls that does not have a dns suffix. Apparently
> I was incorrect when reporting all of my SysNames are accurate. Anyway to
> account for SysNames not having a suffix?
> >
> > -Chip
> >
> >
> >
> > On Mon, Mar 3, 2014 at 11:14 AM, Chip Pleasants <[email protected]>
> wrote:
> > Hi Carlos,
> >
> > Thanks for responding and sorry for these beginner SQL questions.  Do I
> use Netdot's web interface or is more of a command line or SQL script. I
> adding your sql commands to a script and tried to add it to the netdot db
> but it didn't look like it did anything.  When I added it to the text file
> for a command it didn't like the '' characters.  I used single quotes in
> replace ' ' .
> >
> > -Chip
> >
> >
> > mysql -u root -p
> > mysql netdot < change-device-name.sql
> >
> > change-device-name.sql
> >
> > UPDATE device, rr SET rr.name=device.sysname
> > WHERE device.name = rr.id
> >       AND device.sysname is not NULL
> >      AND device.sysname != '';
> >
> >
> >
> >
> >
> >
> > On Mon, Mar 3, 2014 at 9:43 AM, Carlos Vicente <[email protected]>
> wrote:
> > Chip,
> >
> > There is no need to delete all devices.
> >
> > You can probably accomplish this with a simple SQL query. Something like:
> >
> > UPDATE device, rr SET rr.name=device.sysname
> > WHERE device.name = rr.id
> >       AND device.sysname is not NULL
> >      AND device.sysname != '';
> >
> > cv
> >
> > On Mar 3, 2014, at 9:31 AM, Chip Pleasants <[email protected]> wrote:
> >
> > > What's the best way to update the devices names in NetDot?  I'm
> changing the dns suffixes for my devices and would like to reflect the new
> suffix and delete the only one in Netdot. Should I delete the devices and
> rescan or is there a faster safer way? I don't want to blow away any Static
> or Reserved addresses.  I have about 1000 devices so manually would take
> far too long. The System Names should be the new name today, so if there is
> some way to use the System Name that would be great. Thanks in advance for
> any assistance.
> > >
> > > Thanks,
> > > Chip
> > >
> > >
> > >
> > > _______________________________________________
> > > Netdot-users mailing list
> > > [email protected]
> > > https://osl.uoregon.edu/mailman/listinfo/netdot-users
> >
> >
> >
> >
> > _______________________________________________
> > Netdot-users mailing list
> > [email protected]
> > https://osl.uoregon.edu/mailman/listinfo/netdot-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140304/4d314074/attachment.html
 

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

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 64, Issue 3
*******************************************

Reply via email to