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. REST API Error (Boyer, Eric)
2. Re: REST API Error (Carlos Vicente)
3. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-14-g133c1d6 ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 30 Mar 2014 22:21:55 +0000
From: "Boyer, Eric" <[email protected]>
Subject: [Netdot-devel] REST API Error
To: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://osl.uoregon.edu/pipermail/netdot-devel/attachments/20140330/17c8ec4e/attachment-0001.html
------------------------------
Message: 2
Date: Mon, 31 Mar 2014 10:13:26 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-devel] REST API Error
To: "Boyer, Eric" <[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
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: Mon, 31 Mar 2014 07:15:20 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.5-rc1-14-g133c1d6
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 133c1d65677d3b7485ab0ba9e928942d35546205 (commit)
from bed532320ade03d4588e67e930fc1bbd87342a3b (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 133c1d65677d3b7485ab0ba9e928942d35546205
Author: Carlos Vicente <[email protected]>
Date: Mon Mar 31 10:15:00 2014 -0400
Typo in rest/host component
diff --git a/htdocs/rest/host b/htdocs/rest/host
index 225d834..534bd81 100644
--- a/htdocs/rest/host
+++ b/htdocs/rest/host
@@ -82,7 +82,7 @@ if ( $rest->{request}->method eq 'GET' ){
$rest->throw(code=>Apache2::Const::NOT_FOUND, msg=>"Address not
found");
}
}elsif ( $ethernet ){
- if ( my $phy = Physaddr->search(address=>$ethernet)->first ){
+ if ( my $phy = PhysAddr->search(address=>$ethernet)->first ){
foreach my $host ( $phy->dhcp_hosts ){
my $ip = $host->ipblock;
$ips{$ip->id} = $ip if $ip;
-----------------------------------------------------------------------
Summary of changes:
htdocs/rest/host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Netdot
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 84, Issue 7
*******************************************