Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


cacti revision 4112: add_device.php - code fixes

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
oxo-oxo
Cacti User


Joined: 30 Aug 2007
Posts: 90
Location: Denmark

PostPosted: Mon Sep 03, 2007 2:54 am    Post subject: cacti revision 4112: add_device.php - code fixes Reply with quote

Hi

add_device.php didn't work for me untill I added some defaults
also help message wrong

Code:
cacti@sjn00375:~/public_html> diff cli/add_device.php ../project/downloads/cacti/branches/BRANCH_0_8_6/cacti/cli/add_device.php
49d48
<       $id             = '';
60,65d58
<       $availability_method = 3;
<       $ping_method = 2;
<       $ping_port = 23;
<       $ping_timeout = 400;
<       $ping_retries = 1;
<
208,214c201,203
<       $host_id = api_device_save(
<               $id, $template_id, $description, $ip,
<               $community, $snmp_ver, $snmp_username, $snmp_password, $snmp_port, $snmp_timeout,
<               $disable,
<               $availability_method,
<               $ping_method,$ping_port,$ping_timeout,$ping_retries,'','','',''
<               );
---
>       $host_id = api_device_save(0, $template_id, $description, $ip,
>                               $community, $snmp_ver, $snmp_username, $snmp_password,
>                               $snmp_port, $snmp_timeout, $disable);
245c234
<       echo "List Options:  --list-host-templates\n";
---
>       echo "List Options:  --list-templates\n";
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5398
Location: Wisconsin, USA

PostPosted: Mon Sep 03, 2007 10:05 am    Post subject: Reply with quote

You need to start submitting bugs with patches.

http://www.cacti.net/bugs.php
Back to top
oxo-oxo
Cacti User


Joined: 30 Aug 2007
Posts: 90
Location: Denmark

PostPosted: Mon Sep 03, 2007 10:18 am    Post subject: Reply with quote

OK I hope the diff I use is ok
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9470
Location: MI, USA

PostPosted: Tue Sep 04, 2007 6:17 am    Post subject: Reply with quote

Owen,

You should check the latest SVN version. I have added this and more to the latest.

TheWitness
Back to top
oxo-oxo
Cacti User


Joined: 30 Aug 2007
Posts: 90
Location: Denmark

PostPosted: Tue Sep 04, 2007 6:22 am    Post subject: Reply with quote

Yep I can see it now

Bug 0000990 needs closing
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9470
Location: MI, USA

PostPosted: Tue Sep 04, 2007 7:33 am    Post subject: Reply with quote

Please test. I have made additional changes. Thanks...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group