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: [Netdot-devel] REST API Error (Carlos Vicente)
2. Re: [Netdot-devel] REST API Error (Boyer, Eric)
3. installer bug (Bassett, Mark)
4. Re: installer bug (Carlos Vicente)
----------------------------------------------------------------------
Message: 1
Date: Tue, 1 Apr 2014 12:36:41 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] [Netdot-devel] REST API Error
To: "Boyer, Eric" <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
Hi Eric,
I see that you now joined the devel list. However, this is the type of question
that should go to the users list, so you may want to join that as well. I am
CC?ing that list so that everyone benefits.
I just made some changes to the /rest/host page to allow deleting DHCP hosts
based on the ethernet. Notice that this will not delete DNS records associated
with the IP associated with the MAC. That would run the risk of deleting too
much.
So yes, the suggestion would be to use the GET operation to obtain the IP
addresses associated with the given MAC, and from there select the A/AAAA or
PTR records, or DHCP hosts that you would like to delete, then use the DELETE
operation.
Hope this helps.
Best,
cv
On Mar 31, 2014, at 11:03 AM, Boyer, Eric <[email protected]> wrote:
> Hi Carlos,
>
> I am not subscribed to that list, sorry about that. Where do I sign up for
> it? Thank you for the quick reply! The fix you suggested did work for the GET
> request I was trying to do. My question now would be how do I essentially do
> the below operation and have it be the inverse operation of adding a host?:
>
> delete(host?etherenet=XXXXXXXXXXXX).
>
> Looking through the code you have for the rest host page, it looks like the
> delete method/function only supports deletes using rrid or ipid, so would I
> just need to do a get first based on the MAC and then regex out the IPID and
> rrid to use in a delete command? Or is there a more elegant way?
>
> Thanks for the help
>
> On Mar 31, 2014, at 9:13 AM, Carlos Vicente <[email protected]> wrote:
>
>> Hi Eric,
>>
>> Your e-mail to netdot-devel failed. Are you subscribed?
>>
>> It looks like there?s a typo in the code. Can you replace Physaddr with
>> PhysAddr and tell me if it solves it?
>>
>>
>> cv
>>
>> On Mar 30, 2014, at 6:21 PM, Boyer, Eric <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I am developing a tool that I am hoping will take advantage of the Netdot
>>> REST API. What I am trying to do is to be able to create a host entry (DNS
>>> (A/PTR), DHCP by inserting MAC) (which I have had success in doing) and
>>> also be able to delete a host entry (DNS,DHCP) by feeding the API only the
>>> MAC address of the host. I am not sure if the later is possible, but here
>>> was something I was trying to do in testing, and the error I was receiving.
>>> The XXXXXXXXXXXX is not the actual address I was using in this example,
>>> just is a placeholder for the real MAC. Any ideas? Also, on the
>>> Netdot::Client::REST page, I was unable to find the examples that are
>>> mentioned.
>>>
>>> Thank you,
>>>
>>> Attempted GET:
>>> /host?ethernet=XXXXXXXXXXXX
>>>
>>>
>>> Can't locate object method "search" via package "Physaddr" (perhaps you
>>> forgot to load "Physaddr"?) at /usr/local/netdot/htdocs/rest/host line 85.
>>>
>>>
>>>
>>>
>>> Can't locate object method "search" via package "Physaddr" (perhaps you
>>> forgot to load "Physaddr"?) at /usr/local/netdot/htdocs/rest/host line 85.
>>>
>>>
>>> Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
>>> HTML::Mason::Exceptions::rethrow_exception('Can\'t locate object method
>>> "search" via package "Physaddr" (perhaps you forgot to load "Physaddr"?) at
>>> /usr/local/netdot/htdocs/rest/host line 85.^J') called at
>>> /usr/local/netdot/htdocs/rest/host line 85
>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX', 'showheader',
>>> 1, 'user', 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>> /usr/share/perl5/HTML/Mason/Component.pm line 135
>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa818065c)',
>>> 'ethernet', 'XXXXXXXXXXXX', 'showheader', 1, 'user',
>>> 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>> /usr/share/perl5/HTML/Mason/Request.pm line 1302
>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet', 'XXXXXXXXXXXX',
>>> 'showheader', 1, 'user', 'Apache2::SiteControl::User=HASH(0xa7c30a7c)',
>>> 'manager', 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)')
>>> called at /usr/share/perl5/HTML/Mason/Request.pm line 955
>>> HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)',
>>> 'user', 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>> /usr/local/netdot/htdocs/rest/autohandler line 22
>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX', 'showheader',
>>> 1) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa8180bd4)',
>>> 'ethernet', 'XXXXXXXXXXXX', 'showheader', 1) called at
>>> /usr/share/perl5/HTML/Mason/Request.pm line 1302
>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet', 'XXXXXXXXXXXX',
>>> 'showheader', 1) called at /usr/share/perl5/HTML/Mason/Request.pm line 955
>>> HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)',
>>> 'showheader', 1) called at /usr/local/netdot/htdocs/autohandler line 76
>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX') called at
>>> /usr/share/perl5/HTML/Mason/Component.pm line 135
>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa8040930)',
>>> 'ethernet', 'XXXXXXXXXXXX') called at
>>> /usr/share/perl5/HTML/Mason/Request.pm line 1297
>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet', 'XXXXXXXXXXXX')
>>> called at /usr/share/perl5/HTML/Mason/Request.pm line 481
>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
>>> HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)')
>>> called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
>>> HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)')
>>> called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
>>> HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xbd0bc3d0)',
>>> 'Apache2::RequestRec=SCALAR(0xbcc4a67c)') called at
>>> /usr/local/netdot/lib/Netdot/Mason.pm line 59
>>> Netdot::Mason::handler('Apache2::RequestRec=SCALAR(0xbcc4a67c)') called at
>>> -e line 0
>>> eval {...} at -e line 0
>>>
>>>
>>> _______________________________________________
>>> Netdot-devel mailing list
>>> [email protected]
>>> https://osl.uoregon.edu/mailman/listinfo/netdot-devel
>>
>
------------------------------
Message: 2
Date: Tue, 1 Apr 2014 17:48:44 +0000
From: "Boyer, Eric" <[email protected]>
Subject: Re: [Netdot-users] [Netdot-devel] REST API Error
To: Carlos Vicente <[email protected]>
Cc: Netdot-users <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="Windows-1252"
Hi Carlos,
Many thanks for both the suggestions and the code revisions! I?ve got the tool
working the way I want it to now.
Thanks again,
On Apr 1, 2014, at 11:36 AM, Carlos Vicente <[email protected]> wrote:
> Hi Eric,
>
> I see that you now joined the devel list. However, this is the type of
> question that should go to the users list, so you may want to join that as
> well. I am CC?ing that list so that everyone benefits.
>
> I just made some changes to the /rest/host page to allow deleting DHCP hosts
> based on the ethernet. Notice that this will not delete DNS records
> associated with the IP associated with the MAC. That would run the risk of
> deleting too much.
>
> So yes, the suggestion would be to use the GET operation to obtain the IP
> addresses associated with the given MAC, and from there select the A/AAAA or
> PTR records, or DHCP hosts that you would like to delete, then use the DELETE
> operation.
>
> Hope this helps.
>
> Best,
>
> cv
>
> On Mar 31, 2014, at 11:03 AM, Boyer, Eric <[email protected]> wrote:
>
>> Hi Carlos,
>>
>> I am not subscribed to that list, sorry about that. Where do I sign up for
>> it? Thank you for the quick reply! The fix you suggested did work for the
>> GET request I was trying to do. My question now would be how do I
>> essentially do the below operation and have it be the inverse operation of
>> adding a host?:
>>
>> delete(host?etherenet=XXXXXXXXXXXX).
>>
>> Looking through the code you have for the rest host page, it looks like the
>> delete method/function only supports deletes using rrid or ipid, so would I
>> just need to do a get first based on the MAC and then regex out the IPID and
>> rrid to use in a delete command? Or is there a more elegant way?
>>
>> Thanks for the help
>>
>> On Mar 31, 2014, at 9:13 AM, Carlos Vicente <[email protected]> wrote:
>>
>>> Hi Eric,
>>>
>>> Your e-mail to netdot-devel failed. Are you subscribed?
>>>
>>> It looks like there?s a typo in the code. Can you replace Physaddr with
>>> PhysAddr and tell me if it solves it?
>>>
>>>
>>> cv
>>>
>>> On Mar 30, 2014, at 6:21 PM, Boyer, Eric <[email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am developing a tool that I am hoping will take advantage of the Netdot
>>>> REST API. What I am trying to do is to be able to create a host entry (DNS
>>>> (A/PTR), DHCP by inserting MAC) (which I have had success in doing) and
>>>> also be able to delete a host entry (DNS,DHCP) by feeding the API only the
>>>> MAC address of the host. I am not sure if the later is possible, but here
>>>> was something I was trying to do in testing, and the error I was
>>>> receiving. The XXXXXXXXXXXX is not the actual address I was using in this
>>>> example, just is a placeholder for the real MAC. Any ideas? Also, on the
>>>> Netdot::Client::REST page, I was unable to find the examples that are
>>>> mentioned.
>>>>
>>>> Thank you,
>>>>
>>>> Attempted GET:
>>>> /host?ethernet=XXXXXXXXXXXX
>>>>
>>>>
>>>> Can't locate object method "search" via package "Physaddr" (perhaps you
>>>> forgot to load "Physaddr"?) at /usr/local/netdot/htdocs/rest/host line 85.
>>>>
>>>>
>>>>
>>>>
>>>> Can't locate object method "search" via package "Physaddr" (perhaps you
>>>> forgot to load "Physaddr"?) at /usr/local/netdot/htdocs/rest/host line 85.
>>>>
>>>>
>>>> Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
>>>> HTML::Mason::Exceptions::rethrow_exception('Can\'t locate object method
>>>> "search" via package "Physaddr" (perhaps you forgot to load "Physaddr"?)
>>>> at /usr/local/netdot/htdocs/rest/host line 85.^J') called at
>>>> /usr/local/netdot/htdocs/rest/host line 85
>>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX', 'showheader',
>>>> 1, 'user', 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>>> /usr/share/perl5/HTML/Mason/Component.pm line 135
>>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa818065c)',
>>>> 'ethernet', 'XXXXXXXXXXXX', 'showheader', 1, 'user',
>>>> 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>>> /usr/share/perl5/HTML/Mason/Request.pm line 1302
>>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet',
>>>> 'XXXXXXXXXXXX', 'showheader', 1, 'user',
>>>> 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>>> /usr/share/perl5/HTML/Mason/Request.pm line 955
>>>> HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)',
>>>> 'user', 'Apache2::SiteControl::User=HASH(0xa7c30a7c)', 'manager',
>>>> 'Apache2::SiteControl::PermissionManager=HASH(0xa80ac254)') called at
>>>> /usr/local/netdot/htdocs/rest/autohandler line 22
>>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX', 'showheader',
>>>> 1) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
>>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa8180bd4)',
>>>> 'ethernet', 'XXXXXXXXXXXX', 'showheader', 1) called at
>>>> /usr/share/perl5/HTML/Mason/Request.pm line 1302
>>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet',
>>>> 'XXXXXXXXXXXX', 'showheader', 1) called at
>>>> /usr/share/perl5/HTML/Mason/Request.pm line 955
>>>> HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)',
>>>> 'showheader', 1) called at /usr/local/netdot/htdocs/autohandler line 76
>>>> HTML::Mason::Commands::__ANON__('ethernet', 'XXXXXXXXXXXX') called at
>>>> /usr/share/perl5/HTML/Mason/Component.pm line 135
>>>> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa8040930)',
>>>> 'ethernet', 'XXXXXXXXXXXX') called at
>>>> /usr/share/perl5/HTML/Mason/Request.pm line 1297
>>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
>>>> HTML::Mason::Request::comp(undef, undef, undef, 'ethernet',
>>>> 'XXXXXXXXXXXX') called at /usr/share/perl5/HTML/Mason/Request.pm line 481
>>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 481
>>>> eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 433
>>>> HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)')
>>>> called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
>>>> HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xa8102274)')
>>>> called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
>>>> HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xbd0bc3d0)',
>>>> 'Apache2::RequestRec=SCALAR(0xbcc4a67c)') called at
>>>> /usr/local/netdot/lib/Netdot/Mason.pm line 59
>>>> Netdot::Mason::handler('Apache2::RequestRec=SCALAR(0xbcc4a67c)') called at
>>>> -e line 0
>>>> eval {...} at -e line 0
>>>>
>>>>
>>>> _______________________________________________
>>>> Netdot-devel mailing list
>>>> [email protected]
>>>> https://osl.uoregon.edu/mailman/listinfo/netdot-devel
>>>
>>
>
------------------------------
Message: 3
Date: Tue, 1 Apr 2014 18:15:41 +0000
From: "Bassett, Mark" <[email protected]>
Subject: [Netdot-users] installer bug
To: "[email protected]" <[email protected]>
Message-ID:
<b9afe1a22e5a614aac33fec49e4e157c039f1...@g4w3305.americas.hpqcorp.net>
Content-Type: text/plain; charset="us-ascii"
I noticed an installer bug if you change the default basedir, the installer in
1.3.6.p1 does not respect that, it still uses the default settings.
<?php
/* This file was automatically created by the NfSen 1.3.6p1 install.pl script */
$COMMSOCKET = "/data/nfsen/var/run/nfsen.comm";
$DEBUG=0;
?>
(from my /etc/nfsen/nfsen.conf fiile)
# Required for default layout
$BASEDIR = "/opt/nfsen";
#
# Where to install the NfSen binaries
$BINDIR="/usr/bin";
#
# Where to install the NfSen Perl modules
$LIBEXECDIR="${BASEDIR}/libexec";
#
# Where to install the config files
$CONFDIR="/etc/nfsen";
#
# NfSen html pages directory:
# All php scripts will be installed here.
# URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
$HTMLDIR = "/var/www/nfsen";
#
# Where to install the docs
$DOCDIR="${HTMLDIR}/doc";
#
# Var space for NfSen
$VARDIR="${BASEDIR}/var";
# directory for all pid files
# $PIDDIR="$VARDIR/run";
#
# Filter directory
# FILTERDIR="${VARDIR}/filters";
#
# FORMATDIR for custom printing formats
# FORMATDIR="${VARDIR}/fmt";
#
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osl.uoregon.edu/pipermail/netdot-users/attachments/20140401/5ed642fb/attachment-0001.html
------------------------------
Message: 4
Date: Tue, 1 Apr 2014 14:18:41 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] installer bug
To: "Bassett, Mark" <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hello Mark,
Did you mean to send this to the nfsen list instead?
cv
On Apr 1, 2014, at 2:15 PM, Bassett, Mark <[email protected]> wrote:
> I noticed an installer bug if you change the default basedir, the installer
> in 1.3.6.p1 does not respect that, it still uses the default settings.
>
> <?php
> /* This file was automatically created by the NfSen 1.3.6p1 install.pl script
> */
>
> $COMMSOCKET = "/data/nfsen/var/run/nfsen.comm";
>
> $DEBUG=0;
>
> ?>
>
> (from my /etc/nfsen/nfsen.conf fiile)
>
> # Required for default layout
> $BASEDIR = "/opt/nfsen";
>
> #
> # Where to install the NfSen binaries
> $BINDIR="/usr/bin";
>
> #
> # Where to install the NfSen Perl modules
> $LIBEXECDIR="${BASEDIR}/libexec";
>
> #
> # Where to install the config files
> $CONFDIR="/etc/nfsen";
>
> #
> # NfSen html pages directory:
> # All php scripts will be installed here.
> # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
> $HTMLDIR = "/var/www/nfsen";
>
> #
> # Where to install the docs
> $DOCDIR="${HTMLDIR}/doc";
>
> #
> # Var space for NfSen
> $VARDIR="${BASEDIR}/var";
>
> # directory for all pid files
> # $PIDDIR="$VARDIR/run";
> #
> # Filter directory
> # FILTERDIR="${VARDIR}/filters";
> #
>
> # FORMATDIR for custom printing formats
> # FORMATDIR="${VARDIR}/fmt";
> #
>
> #
> _______________________________________________
> 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
End of Netdot-users Digest, Vol 65, Issue 1
*******************************************