├── INSTALL.md ├── LICENSE ├── README.md ├── examples ├── Upgrade_Junos.php ├── test_config.php ├── test_load_file.php ├── test_method_missing.php ├── test_operationcommand.php └── test_parse_rpc_reply.php ├── netconf ├── CommitException.php ├── Device.php ├── LoadException.php ├── NetconfException.php ├── XML.php └── XMLBuilder.php ├── phpdoc ├── blank.html ├── classtrees_default.html ├── default │ ├── A.html │ ├── CommitException.html │ ├── Device.html │ ├── DeviceTest.html │ ├── LoadException.html │ ├── NetconfException.html │ ├── XML.html │ ├── XMLBuilder.html │ ├── _TestCases---netconf---DeviceTest.php.html │ ├── _TestCases---testAPIsFunction.php.html │ ├── _TestCases---testClass.php.html │ ├── _TestCases---testassert.php.html │ ├── _examples---changed_files.php.html │ ├── _examples---chk_expect.php.html │ ├── _examples---cli_command.php.html │ ├── _examples---commit_config.php.html │ ├── _examples---device_method_missing.php.html │ ├── _examples---device_ssh_session.php.html │ ├── _examples---device_text_conf.php.html │ ├── _examples---edit_clock.php.html │ ├── _examples---edit_configuration.php.html │ ├── _examples---get_chassis_inventory.php.html │ ├── _examples---method_missing.php.html │ ├── _examples---session.php.html │ ├── _examples---ssh_session.php.html │ ├── _examples---test_config.php.html │ ├── _examples---test_framework.php.html │ ├── _examples---test_load_file.php.html │ ├── _examples---test_method_missing.php.html │ ├── _examples---test_operation.php.html │ ├── _examples---test_operationcommand.php.html │ ├── _examples---test_ssh_conf.php.html │ ├── _netconf---CommitException.php.html │ ├── _netconf---Device.php.html │ ├── _netconf---LoadException.php.html │ ├── _netconf---NetconfException.php.html │ ├── _netconf---XML.php.html │ ├── _netconf---XMLBuilder.php.html │ ├── session.html │ ├── testAPIsFunction.html │ ├── testClass.html │ └── testassert.html ├── elementindex.html ├── elementindex_default.html ├── errors.html ├── index.html ├── li_default.html ├── media │ ├── banner.css │ └── stylesheet.css ├── packages.html └── todolist.html └── tests └── unit └── DeviceTest.php /INSTALL.md: -------------------------------------------------------------------------------- 1 | PREREQUISITES 2 | ============= 3 | 4 | The NETCONF PHP APIs depends on expect package of php http://pecl.php.net/package/expect 5 | 6 | INSTALLING PREREQUISITES IN UBUNTU 7 | =================================== 8 | * Install PHP and PHP Development Framwork 9 | apt-get install php5 php5-dev (current stable version of php). 10 | * Install php-pear (PHP Extension and Application Repository) 11 | apt-get install php-pear 12 | to verify whether pear is installed properly or not, type command pear, there you will get 13 | list of command like discover-channel, upgrade,upgrade-all,if pear is successfully installed. 14 | * Install Tool command language (TCL) and TK,for installing expect package 15 | apt-get install tcl tcl-dev tk tk-dev 16 | * Install Expect package, required for php-expect 17 | apt-get install expect expect-dev 18 | * Install php-expect using pecl 19 | pecl install expect 20 | Sometime it may give error regarding channel, then use the path mentioned in suggestion like 21 | pecl install channel://pecl.php.net/expect-0.3.1 22 | After successful installation of expect package, add the following line under extension in 23 | php.ini file (this will also be shown after successful installation of expect function) 24 | extension = expect.so 25 | 26 | Note: These installation steps are tested in Ubuntu12.04LTS and other higher version. 27 | 28 | INSTALLING PREREQUITES IN FEDORA/CENTOS 29 | ======================================= 30 | 31 | * Install PHP and its Development Framework 32 | yum install php php-devel php-common 33 | * Install php-pear (PHP Extension and Application Repository) 34 | yum install php-pear 35 | To verify whether pear is installed properly or not, type command pear, there you will get 36 | list of command like discover-channel, upgrade,upgrade-all,if pear is successfully installed. 37 | * Install Tool command language (TCL) and TK, required for expect package 38 | yum install tcl tcl-devel tk tk-devel 39 | * Install Expect package required for php-expect 40 | yum install expect expect-devel 41 | * Install php-expect using pecl 42 | pecl install expect 43 | sometimes it may give error regarding channel,then use the path mentioned in suggestion like 44 | pecl install channel://pecl.php.net/expect-0.3.1 45 | After successful installation of expect package, add the following line under extension in 46 | php.ini file (this will also be shown after successful installation of expect function) 47 | extension = expect.so 48 | 49 | Note: These installation steps are successfully tested in Fedora 15 i686 and Centos-6.5-i386. 50 | 51 | INSTALLING PHP-NETCONF-APIs 52 | =========================== 53 | 54 | Before installing NETCONF PHP APIs make sure your system has all above mentioned requirements. 55 | 56 | Download netconf-php folder fom github at any path in your Desktop 57 | * wget -O /any/path/in/Desktop/netconf-php-master.zip https://github.com/Juniper/netconf-php/archive/master.zip 58 | * unzip netconf-php-master.zip 59 | * copy netconf folder in default path of php (usually default path is /usr/share/php) 60 | 61 | include this path in your program for Device.php,For example while writing your code, include path 62 | include('netconf/Device.php') 63 | 64 | 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | (BSD 2) 2 | 3 | Copyright © 2014, Juniper Networks 4 | 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following 8 | conditions are met: 9 | 10 | (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following 11 | disclaimer. 12 | 13 | (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following 14 | disclaimer in the documentation and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING, 17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 | EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING,BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR 21 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 22 | POSSIBILITY OF SUCH DAMAGE. 23 | 24 | The views and conclusions contained in the software and documentation are those of the authors and should not be 25 | interpreted as representing official policies, either expressed or implied, of Juniper Networks. 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NETCONF-PHP 2 | ============ 3 | 4 | PHP library for NETCONF 5 | 6 | SUPPORT 7 | ======= 8 | 9 | This software is not officially supported by Juniper Networks,but by a team dedicated to helping customers, partners and the development community.To report bug-fixes, issues, suggestion please contact netconf-automation-hackers@juniper.net 10 | 11 | FEATURES 12 | ======== 13 | 14 | PHP NETCONF APIs are designed to provide the same capabilties that a user would have on the Junos CLI, but in an environment built for automation tasks.These capabilities include, but are not limited to: 15 | 16 | * Remote connectivity and management of Junos devices via NETCONF. 17 | * Provide "facts" about the device such as software-version, serial-number etc. 18 | * Retrieve "operational" or "run-state" information. 19 | * Retrieve configuration information. 20 | * Make configuration changes in unstructured and structured ways. 21 | 22 | REQUIREMENTS 23 | ============ 24 | 25 | Installation requires Php and php-expect module. PHP NETCONF APIs are successfully tested in php5.5.3 26 | 27 | INSTALLATION 28 | ============ 29 | Note: These installation steps are successfully tested in Fedora 15 i686 and Centos-6.5-i386 and Ubuntu12.04LTS and higher version. 30 | 31 | Before installing PHP-NETCONF-API make sure that you have installed all the requirements. 32 | For detailed steps about installation, refer to INSTALL.md file. 33 | 34 | Download netconf-php folder in zip form at any path in your Desktop 35 | * wget -O /any/path/in/Desktop/netconf-php-master.zip https://github.com/Juniper/netconf-php/archive/master.zip 36 | (usually default path of php is /usr/share/php) 37 | * unzip netconf-php-master.zip 38 | * Copy netconf folder in /usr/share/php (default php path) 39 | include this path in your API for Device.php 40 | For example while writing your code, include path 41 | include('netconf/Device.php') 42 | 43 | SYNOPSIS 44 | ======== 45 | connect(); 50 | echo "connected to device"; 51 | //getting reply from server 52 | try 53 | { 54 | $inven=$d->get_system_information(); 55 | echo $inven->to_string(); 56 | } 57 | catch(Exception $e) 58 | { 59 | echo 'exception', $e->getMessage(), "\n"; 60 | } 61 | //closing device 62 | $d->close(); 63 | echo "device closed"; 64 | ?> 65 | 66 | Sample Output: 67 | 68 | 69 | olive 70 | junos 71 | 13.2R4 72 | foo 73 | 74 | 75 | 76 | 77 | License 78 | ======= 79 | (BSD 2) 80 | 81 | Copyright © 2014, Juniper Networks 82 | 83 | All rights reserved. 84 | 85 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 86 | 87 | (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 88 | 89 | (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 90 | 91 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 92 | 93 | The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Juniper Networks. 94 | 95 | Dependencies 96 | ============ 97 | The API requires installation of PHP extension for expect library. 98 | http://pecl.php.net/package/expect 99 | 100 | -------------------------------------------------------------------------------- /examples/Upgrade_Junos.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 13 | $d= new Device($param); 14 | 15 | //creating a new device, by passing strings as argument 16 | //$d= new Device("hostname", "username", "passwd"); 17 | 18 | /** optional 19 | can set connectTimeout and replytimeout value before connecting to device 20 | $d->setReplyTimeout(35); 21 | $d->setConnectTimeout(10); 22 | */ 23 | 24 | //connect to device and establish netconf session 25 | $d->connect(); 26 | 27 | //creating rpc for upgrading Junos 28 | $rpc = ""; 29 | $rpc.=""; 30 | $rpc.= ""; 31 | $rpc.= "....path/of/package......."; 32 | $rpc.= ""; 33 | $rpc.= ""; 34 | $rpc.=""; 35 | $rpc.=""; 36 | $rpc.=""; 37 | $rpc.="]]>]]>\n"; 38 | echo "\nexecuting rpc \n\n"; 39 | 40 | //run the rpc from execute_rpc method 41 | $reply=$d->execute_rpc($rpc); 42 | echo $reply->to_string(); 43 | 44 | //reboot the system 45 | echo"\n\nrebooting the system\n"; 46 | $d->reboot(); 47 | 48 | //close the device 49 | echo"\nclosing\n"; 50 | $d->close(); 51 | ?> 52 | 53 | -------------------------------------------------------------------------------- /examples/test_config.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 12 | $d= new Device($param); 13 | 14 | //creating a new device, by passing strings as argument 15 | //$d= new Device("hostname", "username", "passwd"); 16 | 17 | /** optional 18 | can set connectTimeout and replytimeout value before connecting to device 19 | $d->setReplyTimeout(35); 20 | $d->setConnectTimeout(10); 21 | */ 22 | 23 | //connect to device and establish netconf session 24 | $d->connect(); 25 | echo "\n connected to device\n"; 26 | 27 | //locking device 28 | $islocked=$d->lock_config(); 29 | $str1= "set system services ftp"; 30 | $str2= "system { services {ftp; }}"; 31 | $str3= ""; 32 | 33 | /* loading xml configuration can be done using xml and xmlBuilder Class 34 | $xml_builder= new XMLBuilder(); 35 | $ftp_config =$xml_builder->create_new_config("system","services","ftp"); 36 | */ 37 | 38 | //Perform configuration change only if device is successfully locked 39 | if($islocked) 40 | { 41 | //can be done by any of these three steps 42 | //$d->load_set_configuration($str1); 43 | //$d->load_text_configuration($str2,"merge"); 44 | $d->load_xml_configuration($str3,"merge"); 45 | 46 | // when loading xmlbuider class 47 | //$d->load_xml_configuration($ftp_config->to_string(),"merge"); 48 | $d->commit(); 49 | } 50 | 51 | //otherwise exit 52 | else 53 | { 54 | echo "device can not be locked"; 55 | exit (1); 56 | } 57 | 58 | //unlocking and closing device 59 | $d->unlock(); 60 | $d->close(); 61 | ?> 62 | 63 | -------------------------------------------------------------------------------- /examples/test_load_file.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 11 | $d= new Device($param); 12 | 13 | //creating a new device, by passing strings as argument 14 | //$d= new Device("hostname", "username", "passwd"); 15 | 16 | /** optional 17 | can set connectTimeout and replytimeout value before connecting to device 18 | $d->setReplyTimeout(35); 19 | $d->setConnectTimeout(10); 20 | */ 21 | 22 | //connect to device and establish netconf session 23 | $d->connect(); 24 | echo "\n connected to device\n"; 25 | 26 | //locking device 27 | $islocked=$d->lock_config(); 28 | 29 | //if successfully locked than loading the configuration from file and commiting changes 30 | if($islocked) 31 | { 32 | //for loading xml file 33 | $d->load_xml_file("/path/to/file","merge"); 34 | 35 | //for loading text file 36 | //$d->load_text_file("/path/to/file","merge"); 37 | 38 | //for loading set file 39 | //$d->load_set_file("/path/to/file"); 40 | $d->commit(); 41 | } 42 | 43 | //if not successfully locked then exit from the function 44 | else 45 | { 46 | echo "device can not be locked"; 47 | exit(1); 48 | } 49 | 50 | //unlocking and closing device 51 | $d->unlock(); 52 | $d->close(); 53 | ?> 54 | 55 | -------------------------------------------------------------------------------- /examples/test_method_missing.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 11 | $d= new Device($param); 12 | 13 | //creating a new device, by passing strings as argument 14 | //$d= new Device("hostname", "username", "passwd"); 15 | 16 | /** optional 17 | can set connectTimeout and replytimeout value before connecting to device 18 | $d->setReplyTimeout(35); 19 | $d->setConnectTimeout(10); 20 | */ 21 | 22 | //connect to device and establish netconf session 23 | $d->connect(); 24 | echo "connected to device"; 25 | 26 | //getting alarm information without calling execute_rpc method 27 | $inven=$d->get_alarm_information(); 28 | echo $inven->to_string(); 29 | 30 | //closing device 31 | $d->close(); 32 | echo "device closed"; 33 | ?> 34 | 35 | -------------------------------------------------------------------------------- /examples/test_operationcommand.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 11 | $d= new Device($param); 12 | 13 | //creating a new device, by passing strings as argument 14 | //$d= new Device("hostname", "username", "passwd"); 15 | 16 | /** optional 17 | can set connectTimeout and replytimeout value before connecting to device 18 | $d->setReplyTimeout(35); 19 | $d->setConnectTimeout(10); 20 | */ 21 | 22 | //connect to device and establish netconf session 23 | $d->connect(); 24 | echo "\n connected to device\n"; 25 | 26 | //getting reply from server using execute_rpc() method 27 | try 28 | { 29 | $reply=$d->execute_rpc("get-system-information"); 30 | //converting xml reply to string and printing it 31 | echo $reply->to_string(); 32 | } 33 | 34 | catch(Exception $e) 35 | { 36 | echo 'exception', $e->getMessage(), "\n"; 37 | } 38 | 39 | //closing device 40 | $d->close(); 41 | echo "device closed"; 42 | ?> 43 | 44 | -------------------------------------------------------------------------------- /examples/test_parse_rpc_reply.php: -------------------------------------------------------------------------------- 1 | "abc","username"=>"xyz", "password"=>"ab12jk"); 11 | $d= new Device($param); 12 | 13 | //creating a new device, by passing strings as argument 14 | //$d= new Device("hostname", "username", "passwd"); 15 | 16 | /** optional 17 | can set connectTimeout and replytimeout value before connecting to device 18 | $d->setReplyTimeout(35); 19 | $d->setConnectTimeout(10); 20 | */ 21 | 22 | //connect to device and establish netconf session 23 | $d->connect(); 24 | echo "connected to device"; 25 | 26 | // getting system information from server by using execute_rpc() 27 | try 28 | { 29 | $inven=$d->execute_rpc("get-system-information"); 30 | 31 | //rpc reply from server is in xml form, so convert xml into string and print 32 | $str=$inven->to_string(); 33 | echo $str; 34 | 35 | //one way is by using xml method find_value() 36 | $list = array('system-information','os-name'); 37 | $val=$inven->find_value($list); 38 | echo "\n\nvalue is".$val ."\n"; 39 | 40 | //other is by using php classes for XML 41 | //get the owner document from xml object 42 | $xmldoc = $inven->get_owner_document(); 43 | 44 | //define DOMXPath object and use query() to parse rpc-reply 45 | $xpathvar = new Domxpath($xmldoc); 46 | 47 | //use local-name() to match on element name with or without namespaces 48 | $queryResult = $xpathvar->query('/*[local-name()="rpc-reply"]/*[local-name()="system-information"]/*[local-name()="os-name"]'); 49 | echo "\n node value : "; 50 | foreach($queryResult as $result){ 51 | echo $result->textContent; 52 | } 53 | } 54 | 55 | catch(Exception $e) 56 | { 57 | echo 'exception', $e->getMessage(), "\n"; 58 | } 59 | 60 | //closing device 61 | $d->close(); 62 | echo "device closed"; 63 | ?> 64 | 65 | -------------------------------------------------------------------------------- /netconf/CommitException.php: -------------------------------------------------------------------------------- 1 | getMessage(); 14 | } 15 | } 16 | 17 | ?> 18 | -------------------------------------------------------------------------------- /netconf/LoadException.php: -------------------------------------------------------------------------------- 1 | getMessage(); 14 | } 15 | } 16 | 17 | ?> 18 | -------------------------------------------------------------------------------- /netconf/NetconfException.php: -------------------------------------------------------------------------------- 1 | getMessage(); 14 | } 15 | } 16 | 17 | ?> 18 | -------------------------------------------------------------------------------- /netconf/XML.php: -------------------------------------------------------------------------------- 1 | XML object represents XML content and provides methods to 7 | * manipulate it. 8 | * The XML object has an 'active' element, which represents the 9 | * hierarchy at which the XML can be manipulated. 10 | *

11 | * As an example, one 12 | *

    13 | *
  1. creates a XMLBuilder object.
  2. 14 | *
  3. create a configuration as an XML object.
  4. 15 | *
  5. Call the loadXMLConfiguration(XML) method on Device
  6. 16 | *
17 | * 18 | */ 19 | class XML { 20 | var $active_element; 21 | var $owner_doc; 22 | 23 | public function XML($active,$document) { 24 | $this->active_element = $active; 25 | $this->owner_doc = $document; 26 | } 27 | 28 | /** 29 | *Get the owner Document for the XML object. 30 | */ 31 | public function get_owner_document() { 32 | return $this->owner_doc; 33 | } 34 | 35 | /** 36 | *Set atirbute for the active element of XML object. 37 | *@param name 38 | * The name of the attribute. 39 | *@param value 40 | * The value of the attribute. 41 | */ 42 | public function set_attribute($name,$value) { 43 | $this->active_element->set_attribute($name,$value); 44 | } 45 | 46 | /** 47 | *Set text for the active elment of XML object. 48 | *@param text 49 | * The text value to be set. 50 | */ 51 | public function set_text($text) { 52 | $firstChild = $this->active_element->firstChild; 53 | if ($firstChild == null) { 54 | $textNode = $this->owner_doc->createTextNode($text); 55 | $this->active_element->appendChild($textNode); 56 | } 57 | else if ($firstChild->nodeType != 3) { 58 | $textNode = $this->domDocument->createNextNode($text); 59 | $this->active_element->appendChild($textNode); 60 | } 61 | else 62 | $firstChild->nodeValue = $text; 63 | } 64 | 65 | /** 66 | *Sets the attribute ("delete","delete") for the active element of 67 | *XML object. 68 | */ 69 | public function junos_delete() { 70 | $this->active_element->set_attribute("delete","delete"); 71 | } 72 | 73 | /** 74 | *Sets the attribute ("active","active") for the active element of 75 | *XML object. 76 | */ 77 | public function junos_active() { 78 | $this->active_element->set_attribute("active","active"); 79 | } 80 | 81 | /** 82 | *Sets the attribute ("inactive","inactive") for the active element of 83 | *XML object. 84 | */ 85 | public function junos_deactivate() { 86 | $this->active_element->set_attribute("inactive","inactive"); 87 | } 88 | 89 | /** 90 | *Sets the attribute ("rename") and ("name") for the active element of 91 | *XML object. 92 | */ 93 | public function junos_rename($toBeRenamed,$newName) { 94 | $this->active_element->set_attribute("rename",$toBeRenamed); 95 | $this->active_element->set_attribute("name",$newName); 96 | } 97 | 98 | /** 99 | *Sets the attribute ("insert") and ("name") for the active eleent of 100 | *XML object. 101 | */ 102 | public function junos_insert($before,$name) { 103 | $this->active_element->set_attribute("insert",$before); 104 | $this->active_element->set_attribute("name",$name); 105 | } 106 | 107 | private function is_assoc($arr) 108 | { 109 | return (is_array($arr) && count(array_filter(array_keys($arr),'is_string')) == count($arr)); 110 | } 111 | 112 | /** 113 | *Append an element under the active elment of XML object. 114 | *This function takes variable no of arguments. 115 | *
    116 | *
  1. only element: Append an element under the active element 117 | *of XML object. The new element now becomes the active element.
  2. 118 | *
  3. one element and one text : Append an element, with text, under the 119 | *active element of XML object. The new element now becomes 120 | *the active element.
  4. 121 | *
  5. one element and an arrya of text values : Append multiple elements, 122 | *with same name but differrent text under the active element of XML object.
  6. 123 | *
  7. An associative array : Append multiple elements with different names 124 | *and different text, under the active element of XML object.In this, 125 | *each entry contains element name as the key and text value as the 126 | *key value.
  8. 127 | *
  9. An element and an associative array : Append an element under the 128 | *active element of XML object. The new element now becomes the 129 | *active element.Then,append multiple elements wiht different names 130 | *and different text, under the new active element.
131 | *@return The modified XML after apending the element. 132 | */ 133 | public function append() { 134 | $numOfArgs = func_num_args(); 135 | if ($numOfArgs < 1 && $numOfArgs > 2) 136 | die("Invalid number of arguments"); 137 | if ($numOfArgs == 2) { 138 | if (!is_array(func_get_arg(1)) && !$this->is_assoc(func_get_arg(1))) { 139 | $newElement = $this->owner_doc->createElement(func_get_arg(0)); 140 | $textNode = $this->owner_doc->createTextNode(func_get_arg(1)); 141 | $this->active_element->appendChild($newElement); 142 | $newElement->appendChild($textNode); 143 | return new XML($newElement,$this->owner_doc); 144 | } 145 | else if (gettype(func_get_arg(1)) == "array" && !$this->is_assoc(func_get_arg(1))) { 146 | foreach (func_get_arg(1) as $text) { 147 | $newElement = $this->owner_doc->createElement(func_get_arg(0)); 148 | $textNode = $this->owner_doc->createTextNode($text); 149 | $this->active_element->appendChild($newElement); 150 | $newElement->appendChild($textNode); 151 | } 152 | return null; 153 | } 154 | else if ($this->is_assoc(func_get_arg(1))) { 155 | $newElement = $this->owner_doc->createElement(func_get_arg(0)); 156 | $this->active_element->appendChild($newElement); 157 | $newXML = new XML($newElement,$this->owner_doc); 158 | $newXML->append(func_get_arg(1)); 159 | return $newXML; 160 | } 161 | } 162 | else { 163 | if ($this->is_assoc(func_get_arg(0))) { 164 | foreach(func_get_arg(0) as $property => $value) { 165 | $this->append($property,$value); 166 | } 167 | } 168 | else { 169 | $newElement = $this->owner_doc->createElement(func_get_arg(0)); 170 | $this->active_element->appendChild($newElement); 171 | return new XML($newElement,$this->owner_doc); 172 | } 173 | } 174 | } 175 | 176 | /** 177 | *Add a sibling with the active element of XML object. 178 | *This function takes variable number of arguments. 179 | *
    180 | *
  1. An element : Add a sibling element with the active element 181 | *of XML object.
  2. 182 | *
  3. An element and a text value: Append a sibling element, with text, 183 | *with the active element of XML object.
184 | */ 185 | public function add_sibling() { 186 | $numOfArgs = func_num_args(); 187 | if ($numOfArgs < 1 && $numOfArgs> 2) 188 | die("Invalid number of arguments"); 189 | $newElement = $this->owner_doc->createElement(func_get_arg(0)); 190 | $parentNode = $this->active_element->parentNode; 191 | if ($numOfArgs == 2) { 192 | $textNode = $this->owner_doc->createTextNode(func_get_arg(1)); 193 | $newElement->appendChild($textNode); 194 | } 195 | $parentNode->appendChild($newElement); 196 | } 197 | 198 | /** 199 | *Add multiple siblings 200 | *This function takes variable number of arguments. 201 | *
    202 | *
  1. An element and an array of text values : Add multiple sibling elements, 203 | *with same names but different text, with the active element of XML object. 204 | *
  2. 205 | *
  3. An associative array : Add multiple siblings with different names 206 | *and different text, with the active element of XML objcet.In this, 207 | *each entry containing element name as the key and text value as the 208 | *key value.
209 | */ 210 | public function add_siblings() { 211 | $numOfArgs = func_num_args(); 212 | if ($numOfArgs < 1 && $numOfArgs >2) 213 | die("Invalid number of arguments"); 214 | $parentNode = $this->active_element->parentNode; 215 | if ($numOfArgs == 1 && $this->is_assoc(func_get_arg(0))) { 216 | $inter = $this->active_element; 217 | $this->active_element = $parentNode; 218 | foreach (func_get_arg(0) as $property => $value) 219 | $this->append($property,$value); 220 | $this->active_element = $inter; 221 | } 222 | else { 223 | foreach (func_get_arg(1) as $text) { 224 | $element = $this->owner_doc->createElement(func_get_arg(0)); 225 | $textNode = $this->owner_doc->createTextNode($text); 226 | $element->appendChild($textNode); 227 | $parentNode->appendChild($element); 228 | } 229 | } 230 | } 231 | 232 | /** 233 | *Append multiple elements under the active element of XML object, 234 | *by specifying the path. The bottom most hierarchy element now becomes 235 | *the active element. 236 | *@param path 237 | * The path to be added. For example, to add the hierarchy: 238 | * <a> 239 | * <b> 240 | * </c> 241 | * </b> 242 | * </a> 243 | * The path should be "a/b/c" 244 | *@return The modified XML. 245 | */ 246 | public function add_path($path) { 247 | $elements = explode("/",$path); 248 | $newElement = null; 249 | foreach ($elements as $value) { 250 | $newElement = $this->owner_doc->createElement($value); 251 | $this->active_element->appendChild($newElement); 252 | $this->active_element = $newElement; 253 | } 254 | return new XML($newElement,$this->owner_doc); 255 | } 256 | 257 | /** 258 | *Get the XML String of the XML object. 259 | *@return the XML data as a string 260 | */ 261 | public function to_string() { 262 | $str = $this->owner_doc->saveXML(); 263 | return $str; 264 | } 265 | 266 | /** 267 | * Find the text value of an element. 268 | * @param list 269 | * The String based list of elements which determine the hierarchy. 270 | * For example, for the below XML: 271 | * <rpc-reply> 272 | * <environment-information> 273 | * <environment-item> 274 | * <name>FPC 0 CPU</name> 275 | * <temperature> 276 | * To find out the text value of temperature node, the list 277 | * should be- {"environment-information","environment-item", 278 | * "name~FPC 0 CPU","temperature"} 279 | * @return The text value of the element. 280 | */ 281 | public function find_value($list) { 282 | $root = $this->owner_doc->documentElement; 283 | $nextElement = $root; 284 | $nextElementFound = false; 285 | for ($k = 0; $k < sizeof($list); $k++) { 286 | $nextElementFound = false; 287 | $nextElementName = $list[$k]; 288 | if (!strpos($nextElementName,"~")) { 289 | $nextElementList = $root->getElementsByTagName($nextElementName); 290 | $n2nString = null; 291 | if ($k < sizeof($list)-1) 292 | $n2nString = $list[$k+1]; 293 | if ($n2nString != null && strpos($n2nString,"~")) { 294 | $n2nText = substr($n2nString,strpos($n2nString,"~")+1); 295 | $n2nElementName = substr($n2nString,0,strpos($n2nString,"~")); 296 | for ($i = 0; $i < sizeof($nextElementList); $i++) { 297 | $nextElement = $nextElementList->item($i); 298 | $n2nElement = $nextElement->getElementsByTagName($n2nElementName)->item(0); 299 | $text = $n2nElement->firstChild->nodeValue; 300 | trim($text); 301 | if ($text != null && $text == $n2nText) { 302 | $nextElementFound = true; 303 | break; 304 | } 305 | } 306 | if (!$nextElementFound) 307 | return null; 308 | } 309 | else { 310 | $nextElement = $nextElementList->item(0); 311 | } 312 | } 313 | else 314 | continue; 315 | } 316 | if ($nextElement == null) 317 | return null; 318 | $value = $nextElement->firstChild->nodeValue; 319 | if ($value == null) 320 | return null; 321 | return trim($value); 322 | } 323 | 324 | } 325 | 326 | ?> 327 | -------------------------------------------------------------------------------- /netconf/XMLBuilder.php: -------------------------------------------------------------------------------- 1 | XMLBuilder is used to create an XML object.This is useful to 5 | * create XML RPC's and configurations. 6 | *

7 | * As an example, one 8 | *

    9 | *
  1. creates a {@link #XMLBuilder() XMLBuilder} object.
  2. 10 | *
  3. create an RPC as an XML object.
  4. 11 | *
  5. Call the execute_rpc(XML) method on Device
  6. 12 | *
13 | */ 14 | class XMLBuilder { 15 | var $dom; 16 | 17 | /** 18 | *Prepares a new XMLBuilder object. 19 | */ 20 | public function XMLBuilder() { 21 | $this->dom = new DOMImplementation(); 22 | } 23 | 24 | /** 25 | *Create a new configuration as an XML object. 26 | *This function takes multiple no of arguments. And can be one elment 27 | *two elements or a list of elements. 28 | *The first argument will be at topmost hierarchy and so on. 29 | *@return XML object. 30 | */ 31 | public function create_new_config() { 32 | $newelement = ""; 33 | $domdocument = $this->dom->createDocument(null,"configuration"); 34 | $domdocument->formatOutput = true; 35 | $rootElement = $domdocument->documentElement; 36 | $root = $rootElement; 37 | if (is_array(func_get_arg(0))) { 38 | foreach (func_get_arg(0) as $value) { 39 | $newelement = $domdocument->createElement($value); 40 | $rootElement->appendChild($newelement); 41 | $rootElement = $newelement; 42 | } 43 | } 44 | else { 45 | $numOfElement = func_num_args(); 46 | $newelement = $domdocument->createElement(func_get_arg(0)); 47 | $rootElement->appendChild($newelement); 48 | for ($i = 1; $i < $numOfElement; $i++) { 49 | $element = $newelement; 50 | $newelement = $domdocument->createElement(func_get_arg($i)); 51 | $newelement = $element->appendChild($newelement); 52 | } 53 | } 54 | return new XML($newelement,$domdocument); 55 | } 56 | /** 57 | *Create a new RPC as an XML object. 58 | *This function takes multiple no of arguments. And can be one elment 59 | *two elements or a list of elements. 60 | *The first argument will be at topmost hierarchy and so on. 61 | *@return XML object. 62 | */ 63 | public function create_new_rpc() { 64 | $newelement = ""; 65 | $domdocument = $this->dom->createDocument(null,"rpc"); 66 | $domdocument->formatOutput = true; 67 | $rootElement = $domdocument->documentElement; 68 | $root = $rootElement; 69 | if (is_array(func_get_arg(0))) { 70 | foreach (func_get_arg(0) as $value) { 71 | $newelement = $domdocument->createElement($value); 72 | $rootElement->appendChild($newelement); 73 | $rootElement = $newelement; 74 | } 75 | } 76 | else { 77 | $numOfElement = func_num_args(); 78 | $newelement = $domdocument->createElement(func_get_arg(0)); 79 | $rootElement->appendChild($newelement); 80 | for ($i = 1; $i < $numOfElement; $i++) { 81 | $element = $newelement; 82 | $newelement = $domdocument->createElement(func_get_arg($i)); 83 | $newelement = $element->appendChild($newelement); 84 | } 85 | } 86 | return new XML($newelement,$domdocument); 87 | } 88 | /** 89 | *Create a new XML as an XML object. 90 | *This function takes multiple no of arguments. And can be one elment 91 | *two elements or a list of elements. 92 | *The first argument will be at topmost hierarchy and so on. 93 | *@return XML object. 94 | */ 95 | public function create_new_xml() { 96 | $newelement = ""; 97 | $domdocument->formatOutput = true; 98 | if (is_array(func_get_arg(0))) { 99 | $arguments = func_get_arg(0); 100 | $domdocument = $this->dom->createDocument(null,$arguments[0]); 101 | $rootElement = $domdocument->documentElement; 102 | $root = $rootElement; 103 | for ($i = 1; $i < sizeof($arguments); $i++) { 104 | $newelement = $domdocument->createElement($arguments[$i]); 105 | $rootElement->appendChild($newelement); 106 | $rootElement = $newelement; 107 | } 108 | } 109 | else { 110 | $domdocument = $this->dom->createDocument(null,func_get_arg(0)); 111 | $rootElement = $domdocument->documentElement; 112 | $numOfElement = func_num_args(); 113 | $newelement = $domdocument->createElement(func_get_arg(1)); 114 | $rootElement->appendChild($newelement); 115 | for ($i =2 ; $i < $numOfElement; $i++) { 116 | $element = $newelement; 117 | $newelement = $domdocument->createElement(func_get_arg($i)); 118 | $newelement = $element->appendChild($newelement); 119 | } 120 | } 121 | return new XML($newelement,$domdocument); 122 | } 123 | 124 | 125 | } 126 | 127 | ?> 128 | -------------------------------------------------------------------------------- /phpdoc/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | NETCONF-PHP-APIs 4 | 5 | 6 | 7 | 8 |

NETCONF-PHP-APIs

9 | Welcome to default!
10 |
11 | This documentation was generated by phpDocumentor v1.4.4
12 | 13 | -------------------------------------------------------------------------------- /phpdoc/classtrees_default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

14 | 15 |

16 |

Root class Device

17 | 19 | 20 |

Root class XML

21 | 23 | 24 |

Root class XMLBuilder

25 | 27 | 28 |

Root class Exception

29 | 31 | 32 |

33 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 34 |

35 | 36 | -------------------------------------------------------------------------------- /phpdoc/default/A.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class A 7 | 8 | 9 | 10 | 11 |
12 |

Class A

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

26 | Located in /examples/method_missing.php (line 2) 27 |

28 | 29 | 30 |

 31 | 	
 32 | 			
33 |
34 | 35 | 36 | 37 | 38 |
39 |
Variable Summary
40 | 47 |
48 |
49 |
50 | mixed 51 | $name 52 |
53 |
54 |
55 |
56 | 57 | 58 |
59 |
Method Summary
60 | 67 |
68 |
69 | 70 |
71 | void 72 | show 73 | ( $str) 74 |
75 |
76 | void 77 | __call 78 | ( $function,  $args) 79 |
80 |
81 |
82 |
83 | 84 | 85 |
86 |
Variables
87 | 96 |
97 | 98 |
99 | 100 |
101 | 102 | mixed 103 | $name 104 | (line 3) 105 | 106 |
107 | 108 | 109 |
    110 |
  • access: public
  • 111 |
112 | 113 | 114 | 115 | 116 | 117 |
118 | 119 |
120 |
121 | 122 | 123 |
124 |
Methods
125 | 131 |
132 | 133 | 134 | 135 |
136 | 137 |
138 | show (line 4) 139 |
140 | 141 | 142 |
    143 |
  • access: public
  • 144 |
145 | 146 |
147 | void 148 | 149 | show 150 | 151 | ( $str) 152 |
153 | 154 |
    155 |
  • 156 | 157 | $str
  • 158 |
159 | 160 | 161 |
162 | 163 |
164 | 165 |
166 | __call (line 9) 167 |
168 | 169 | 170 |
    171 |
  • access: public
  • 172 |
173 | 174 |
175 | void 176 | 177 | __call 178 | 179 | ( $function,  $args) 180 |
181 | 182 |
    183 |
  • 184 | 185 | $function
  • 186 |
  • 187 | 188 | $args
  • 189 |
190 | 191 | 192 |
193 | 194 |
195 |
196 | 197 | 198 |

199 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 200 |

201 |
202 | -------------------------------------------------------------------------------- /phpdoc/default/CommitException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class CommitException 7 | 8 | 9 | 10 | 11 |
12 |

Class CommitException

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

Describes exceptions related to commit operation

26 |

27 | Located in /netconf/CommitException.php (line 6) 28 |

29 | 30 | 31 |
Exception
 32 |    |
 33 |    --CommitException
34 | 35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 |
43 |
Method Summary
44 | 51 |
52 |
53 | 54 |
55 | CommitException 56 | CommitException 57 | ( $msg) 58 |
59 |
60 | void 61 | getErrorMessage 62 | () 63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 |
Variables
71 | 80 |
81 |

Inherited Variables

82 | 83 |

Inherited from Exception (Internal Class)

84 |
85 | 86 | $code
87 |
88 | 89 | $file
90 |
91 | 92 | $line
93 |
94 | 95 | $message
96 |
97 | 98 | $previous
99 |
100 | 101 | $string
102 |
103 | 104 | $trace
105 |
106 |
107 | 108 |
109 |
110 | 111 | 112 |
113 |
Methods
114 | 120 |
121 | 122 | 123 | 124 |
125 | 126 |
127 | Constructor CommitException (line 8) 128 |
129 | 130 | 131 |
    132 |
  • access: public
  • 133 |
134 | 135 |
136 | CommitException 137 | 138 | CommitException 139 | 140 | ( $msg) 141 |
142 | 143 |
    144 |
  • 145 | 146 | $msg
  • 147 |
148 | 149 | 150 |
151 | 152 |
153 | 154 |
155 | getErrorMessage (line 12) 156 |
157 | 158 | 159 |
    160 |
  • access: public
  • 161 |
162 | 163 |
164 | void 165 | 166 | getErrorMessage 167 | 168 | () 169 |
170 | 171 | 172 | 173 |
174 |

Inherited Methods

175 | 176 | 177 |

Inherited From Exception (Internal Class)

178 |
179 | constructor __construct ( [$message = ], [$code = ], [$previous = ] )
180 | getCode ( )
181 | getFile ( )
182 | getLine ( )
183 | getMessage ( )
184 | getPrevious ( )
185 | getTrace ( )
186 | getTraceAsString ( )
187 | __clone ( )
188 | __toString ( )
189 |
190 | 191 |
192 |
193 | 194 | 195 |

196 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 197 |

198 |
199 | -------------------------------------------------------------------------------- /phpdoc/default/DeviceTest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class DeviceTest 7 | 8 | 9 | 10 | 11 |
12 |

Class DeviceTest

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

26 | Located in /TestCases/netconf/DeviceTest.php (line 4) 27 |

28 | 29 | 30 |
PHPUnit_Framework_TestCase
 31 |    |
 32 |    --DeviceTest
33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 |
41 |
Variable Summary
42 | 49 |
50 |
51 |
52 | static mixed 53 | $d 54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
Method Summary
62 | 69 |
70 |
71 |
72 | static void 73 | setUpBeforeClass 74 | () 75 |
76 | 77 |
78 | void 79 | testClose 80 | () 81 |
82 |
83 | void 84 | testClose_configuration 85 | () 86 |
87 |
88 | void 89 | testCommit 90 | () 91 |
92 |
93 | void 94 | testCommit_confirm 95 | () 96 |
97 |
98 | void 99 | testConnect 100 | () 101 |
102 |
103 | void 104 | testExecute_rpc 105 | () 106 |
107 |
108 | void 109 | testGet_running_config 110 | () 111 |
112 |
113 | void 114 | testLoad_set_configuration 115 | () 116 |
117 |
118 | void 119 | testLoad_set_file 120 | () 121 |
122 |
123 | void 124 | testLoad_text_configuration 125 | () 126 |
127 |
128 | void 129 | testLoad_text_file 130 | () 131 |
132 |
133 | void 134 | testLoad_xml_configuration 135 | () 136 |
137 |
138 | void 139 | testLoad_xml_file 140 | () 141 |
142 |
143 | void 144 | testLock_config 145 | () 146 |
147 |
148 | void 149 | testOpen_configuration 150 | () 151 |
152 |
153 | void 154 | testUnlock_config 155 | () 156 |
157 |
158 | void 159 | testValidate 160 | () 161 |
162 |
163 |
164 |
165 | 166 | 167 |
168 |
Variables
169 | 178 |
179 | 180 |
181 | 182 |
183 | 184 | static mixed 185 | $d 186 | (line 6) 187 | 188 |
189 | 190 | 191 |
    192 |
  • access: protected
  • 193 |
194 | 195 | 196 | 197 | 198 | 199 |
200 | 201 |
202 |
203 | 204 | 205 |
206 |
Methods
207 | 213 |
214 | 215 | 216 |
217 | 218 |
219 | static method setUpBeforeClass (line 8) 220 |
221 | 222 | 223 |
    224 |
  • access: public
  • 225 |
226 | 227 |
228 | static 229 | void 230 | 231 | setUpBeforeClass 232 | 233 | () 234 |
235 | 236 | 237 | 238 |
239 | 240 | 241 |
242 | 243 |
244 | testClose (line 438) 245 |
246 | 247 | 248 |
    249 |
  • todo: Implement testClose().
  • 250 |
  • access: public
  • 251 |
252 | 253 |
254 | void 255 | 256 | testClose 257 | 258 | () 259 |
260 | 261 | 262 | 263 |
264 | 265 |
266 | 267 |
268 | testClose_configuration (line 422) 269 |
270 | 271 | 272 |
    273 |
  • todo: Implement testClose_configuration().
  • 274 |
  • access: public
  • 275 |
276 | 277 |
278 | void 279 | 280 | testClose_configuration 281 | 282 | () 283 |
284 | 285 | 286 | 287 |
288 | 289 |
290 | 291 |
292 | testCommit (line 216) 293 |
294 | 295 | 296 |
    297 |
  • todo: Implement testCommit().
  • 298 |
  • access: public
  • 299 |
300 | 301 |
302 | void 303 | 304 | testCommit 305 | 306 | () 307 |
308 | 309 | 310 | 311 |
312 | 313 |
314 | 315 |
316 | testCommit_confirm (line 231) 317 |
318 | 319 | 320 |
    321 |
  • todo: Implement testCommit_confirm().
  • 322 |
  • access: public
  • 323 |
324 | 325 |
326 | void 327 | 328 | testCommit_confirm 329 | 330 | () 331 |
332 | 333 | 334 | 335 |
336 | 337 |
338 | 339 |
340 | testConnect (line 18) 341 |
342 | 343 | 344 |
    345 |
  • todo: Implement testConnect().
  • 346 |
  • access: public
  • 347 |
348 | 349 |
350 | void 351 | 352 | testConnect 353 | 354 | () 355 |
356 | 357 | 358 | 359 |
360 | 361 |
362 | 363 |
364 | testExecute_rpc (line 135) 365 |
366 | 367 | 368 |
    369 |
  • todo: Implement testExecute_rpc().
  • 370 |
  • access: public
  • 371 |
372 | 373 |
374 | void 375 | 376 | testExecute_rpc 377 | 378 | () 379 |
380 | 381 | 382 | 383 |
384 | 385 |
386 | 387 |
388 | testGet_running_config (line 351) 389 |
390 | 391 | 392 |
    393 |
  • todo: Implement testGet_running_config(). depends testConnect
  • 394 |
  • todo: Implement testGet_candidate_config().
  • 395 |
  • access: public
  • 396 |
397 | 398 |
399 | void 400 | 401 | testGet_running_config 402 | 403 | () 404 |
405 | 406 | 407 | 408 |
409 | 410 |
411 | 412 |
413 | testLoad_set_configuration (line 198) 414 |
415 | 416 | 417 |
    418 |
  • todo: Implement testLoad_set_configuration().
  • 419 |
  • access: public
  • 420 |
421 | 422 |
423 | void 424 | 425 | testLoad_set_configuration 426 | 427 | () 428 |
429 | 430 | 431 | 432 |
433 | 434 |
435 | 436 |
437 | testLoad_set_file (line 326) 438 |
439 | 440 | 441 |
    442 |
  • todo: Implement testLoad_set_file().
  • 443 |
  • access: public
  • 444 |
445 | 446 |
447 | void 448 | 449 | testLoad_set_file 450 | 451 | () 452 |
453 | 454 | 455 | 456 |
457 | 458 |
459 | 460 |
461 | testLoad_text_configuration (line 179) 462 |
463 | 464 | 465 |
    466 |
  • todo: Implement testLoad_text_configuration().
  • 467 |
  • access: public
  • 468 |
469 | 470 |
471 | void 472 | 473 | testLoad_text_configuration 474 | 475 | () 476 |
477 | 478 | 479 | 480 |
481 | 482 |
483 | 484 |
485 | testLoad_text_file (line 309) 486 |
487 | 488 | 489 |
    490 |
  • todo: Implement testLoad_text_file(). depends testConnect depends testLoad_config
  • 491 |
  • access: public
  • 492 |
493 | 494 |
495 | void 496 | 497 | testLoad_text_file 498 | 499 | () 500 |
501 | 502 | 503 | 504 |
505 | 506 |
507 | 508 |
509 | testLoad_xml_configuration (line 162) 510 |
511 | 512 | 513 |
    514 |
  • todo: Implement testLoad_xml_configuration().
  • 515 |
  • access: public
  • 516 |
517 | 518 |
519 | void 520 | 521 | testLoad_xml_configuration 522 | 523 | () 524 |
525 | 526 | 527 | 528 |
529 | 530 |
531 | 532 |
533 | testLoad_xml_file (line 291) 534 |
535 | 536 | 537 |
    538 |
  • todo: Implement testLoad_xml_file().
  • 539 |
  • access: public
  • 540 |
541 | 542 |
543 | void 544 | 545 | testLoad_xml_file 546 | 547 | () 548 |
549 | 550 | 551 | 552 |
553 | 554 |
555 | 556 |
557 | testLock_config (line 147) 558 |
559 | 560 | 561 |
    562 |
  • todo: Implement testLock_config().
  • 563 |
  • access: public
  • 564 |
565 | 566 |
567 | void 568 | 569 | testLock_config 570 | 571 | () 572 |
573 | 574 | 575 | 576 |
577 | 578 |
579 | 580 |
581 | testOpen_configuration (line 405) 582 |
583 | 584 | 585 |
    586 |
  • todo: Implement testOpen_configuration().
  • 587 |
  • access: public
  • 588 |
589 | 590 |
591 | void 592 | 593 | testOpen_configuration 594 | 595 | () 596 |
597 | 598 | 599 | 600 |
601 | 602 |
603 | 604 |
605 | testUnlock_config (line 387) 606 |
607 | 608 | 609 |
    610 |
  • todo: Implement testUnlock_config().
  • 611 |
  • access: public
  • 612 |
613 | 614 |
615 | void 616 | 617 | testUnlock_config 618 | 619 | () 620 |
621 | 622 | 623 | 624 |
625 | 626 |
627 | 628 |
629 | testValidate (line 246) 630 |
631 | 632 | 633 |
    634 |
  • todo: Implement testValidate().
  • 635 |
  • access: public
  • 636 |
637 | 638 |
639 | void 640 | 641 | testValidate 642 | 643 | () 644 |
645 | 646 | 647 | 648 |
649 | 650 |
651 |
652 | 653 | 654 |

655 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 656 |

657 |
658 | -------------------------------------------------------------------------------- /phpdoc/default/LoadException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class LoadException 7 | 8 | 9 | 10 | 11 |
12 |

Class LoadException

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

Describes exceptions related to load operation

26 |

27 | Located in /netconf/LoadException.php (line 6) 28 |

29 | 30 | 31 |
Exception
 32 |    |
 33 |    --LoadException
34 | 35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 |
43 |
Method Summary
44 | 51 |
52 |
53 | 54 |
55 | LoadException 56 | LoadException 57 | ( $msg) 58 |
59 |
60 | void 61 | getErrorMessage 62 | () 63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 |
Variables
71 | 80 |
81 |

Inherited Variables

82 | 83 |

Inherited from Exception (Internal Class)

84 |
85 | 86 | $code
87 |
88 | 89 | $file
90 |
91 | 92 | $line
93 |
94 | 95 | $message
96 |
97 | 98 | $previous
99 |
100 | 101 | $string
102 |
103 | 104 | $trace
105 |
106 |
107 | 108 |
109 |
110 | 111 | 112 |
113 |
Methods
114 | 120 |
121 | 122 | 123 | 124 |
125 | 126 |
127 | Constructor LoadException (line 8) 128 |
129 | 130 | 131 |
    132 |
  • access: public
  • 133 |
134 | 135 |
136 | LoadException 137 | 138 | LoadException 139 | 140 | ( $msg) 141 |
142 | 143 |
    144 |
  • 145 | 146 | $msg
  • 147 |
148 | 149 | 150 |
151 | 152 |
153 | 154 |
155 | getErrorMessage (line 12) 156 |
157 | 158 | 159 |
    160 |
  • access: public
  • 161 |
162 | 163 |
164 | void 165 | 166 | getErrorMessage 167 | 168 | () 169 |
170 | 171 | 172 | 173 |
174 |

Inherited Methods

175 | 176 | 177 |

Inherited From Exception (Internal Class)

178 |
179 | constructor __construct ( [$message = ], [$code = ], [$previous = ] )
180 | getCode ( )
181 | getFile ( )
182 | getLine ( )
183 | getMessage ( )
184 | getPrevious ( )
185 | getTrace ( )
186 | getTraceAsString ( )
187 | __clone ( )
188 | __toString ( )
189 |
190 | 191 |
192 |
193 | 194 | 195 |

196 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 197 |

198 |
199 | -------------------------------------------------------------------------------- /phpdoc/default/NetconfException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class NetconfException 7 | 8 | 9 | 10 | 11 |
12 |

Class NetconfException

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

Describes exceptions related to establishing Netocnf session.

26 |

27 | Located in /netconf/NetconfException.php (line 6) 28 |

29 | 30 | 31 |
Exception
 32 |    |
 33 |    --NetconfException
34 | 35 |
36 |
37 | 38 | 39 | 40 | 41 | 42 |
43 |
Method Summary
44 | 51 |
52 |
53 | 54 |
55 | NetconfException 56 | NetconfException 57 | ( $msg) 58 |
59 |
60 | void 61 | getErrorMessage 62 | () 63 |
64 |
65 |
66 |
67 | 68 | 69 |
70 |
Variables
71 | 80 |
81 |

Inherited Variables

82 | 83 |

Inherited from Exception (Internal Class)

84 |
85 | 86 | $code
87 |
88 | 89 | $file
90 |
91 | 92 | $line
93 |
94 | 95 | $message
96 |
97 | 98 | $previous
99 |
100 | 101 | $string
102 |
103 | 104 | $trace
105 |
106 |
107 | 108 |
109 |
110 | 111 | 112 |
113 |
Methods
114 | 120 |
121 | 122 | 123 | 124 |
125 | 126 |
127 | Constructor NetconfException (line 8) 128 |
129 | 130 | 131 |
    132 |
  • access: public
  • 133 |
134 | 135 |
136 | NetconfException 137 | 138 | NetconfException 139 | 140 | ( $msg) 141 |
142 | 143 |
    144 |
  • 145 | 146 | $msg
  • 147 |
148 | 149 | 150 |
151 | 152 |
153 | 154 |
155 | getErrorMessage (line 12) 156 |
157 | 158 | 159 |
    160 |
  • access: public
  • 161 |
162 | 163 |
164 | void 165 | 166 | getErrorMessage 167 | 168 | () 169 |
170 | 171 | 172 | 173 |
174 |

Inherited Methods

175 | 176 | 177 |

Inherited From Exception (Internal Class)

178 |
179 | constructor __construct ( [$message = ], [$code = ], [$previous = ] )
180 | getCode ( )
181 | getFile ( )
182 | getLine ( )
183 | getMessage ( )
184 | getPrevious ( )
185 | getTrace ( )
186 | getTraceAsString ( )
187 | __clone ( )
188 | __toString ( )
189 |
190 | 191 |
192 |
193 | 194 | 195 |

196 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 197 |

198 |
199 | -------------------------------------------------------------------------------- /phpdoc/default/XMLBuilder.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class XMLBuilder 7 | 8 | 9 | 10 | 11 |
12 |

Class XMLBuilder

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

An

is used to create an XML object.This is useful to create XML RPC's and configurations.

27 |

As an example, one

  1. creates a #XMLBuilder() object.
  2. create an RPC as an XML object.
  3. Call the execute_rpc(XML) method on Device

28 |

29 | Located in /netconf/XMLBuilder.php (line 14) 30 |

31 | 32 | 33 |

 34 | 	
 35 | 			
36 |
37 | 38 | 39 | 40 | 41 |
42 |
Variable Summary
43 | 50 |
51 |
52 |
53 | mixed 54 | $dom 55 |
56 |
57 |
58 |
59 | 60 | 61 |
62 |
Method Summary
63 | 70 |
71 |
72 | 73 |
74 | XMLBuilder 75 | XMLBuilder 76 | () 77 |
78 |
79 | XML 80 | create_new_config 81 | () 82 |
83 |
84 | XML 85 | create_new_rpc 86 | () 87 |
88 |
89 | XML 90 | create_new_xml 91 | () 92 |
93 |
94 |
95 |
96 | 97 | 98 |
99 |
Variables
100 | 109 |
110 | 111 |
112 | 113 |
114 | 115 | mixed 116 | $dom 117 | (line 15) 118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
128 | 129 |
130 |
131 | 132 | 133 |
134 |
Methods
135 | 141 |
142 | 143 | 144 | 145 |
146 | 147 |
148 | Constructor XMLBuilder (line 20) 149 |
150 | 151 | 152 |

Prepares a new

153 |
    154 |
  • access: public
  • 155 |
156 | 157 |
158 | XMLBuilder 159 | 160 | XMLBuilder 161 | 162 | () 163 |
164 | 165 | 166 | 167 |
168 | 169 |
170 | 171 |
172 | create_new_config (line 31) 173 |
174 | 175 | 176 |

Create a new configuration as an XML object.

177 |

This function takes multiple no of arguments. And can be one elment two elements or a list of elements. The first argument will be at topmost hierarchy and so on.

178 |
    179 |
  • return: object.
  • 180 |
  • access: public
  • 181 |
182 | 183 |
184 | XML 185 | 186 | create_new_config 187 | 188 | () 189 |
190 | 191 | 192 | 193 |
194 | 195 |
196 | 197 |
198 | create_new_rpc (line 63) 199 |
200 | 201 | 202 |

Create a new RPC as an XML object.

203 |

This function takes multiple no of arguments. And can be one elment two elements or a list of elements. The first argument will be at topmost hierarchy and so on.

204 |
    205 |
  • return: object.
  • 206 |
  • access: public
  • 207 |
208 | 209 |
210 | XML 211 | 212 | create_new_rpc 213 | 214 | () 215 |
216 | 217 | 218 | 219 |
220 | 221 |
222 | 223 |
224 | create_new_xml (line 95) 225 |
226 | 227 | 228 |

Create a new XML as an XML object.

229 |

This function takes multiple no of arguments. And can be one elment two elements or a list of elements. The first argument will be at topmost hierarchy and so on.

230 |
    231 |
  • return: object.
  • 232 |
  • access: public
  • 233 |
234 | 235 |
236 | XML 237 | 238 | create_new_xml 239 | 240 | () 241 |
242 | 243 | 244 | 245 |
246 | 247 |
248 |
249 | 250 | 251 |

252 | Documentation generated on Fri, 28 Feb 2014 11:44:21 +0000 by phpDocumentor 1.4.4 253 |

254 |
255 | -------------------------------------------------------------------------------- /phpdoc/default/_TestCases---netconf---DeviceTest.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page DeviceTest.php 7 | 8 | 9 | 10 | 11 |
12 |

/TestCases/netconf/DeviceTest.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | DeviceTest 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | require_once 69 | ('/home/automation/NetBeansProjects/netconf-php-master (copy)/netconf/Device.php') 70 | (line 2) 71 | 72 |
73 | 74 | 75 | 76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 |

84 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 85 |

86 |
87 | -------------------------------------------------------------------------------- /phpdoc/default/_TestCases---testAPIsFunction.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page testAPIsFunction.php 7 | 8 | 9 | 10 | 11 |
12 |

/TestCases/testAPIsFunction.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | testAPIsFunction 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 | 73 | 74 | 75 | 76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 |

84 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 85 |

86 |
87 | -------------------------------------------------------------------------------- /phpdoc/default/_TestCases---testClass.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page testClass.php 7 | 8 | 9 | 10 | 11 |
12 |

/TestCases/testClass.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | testClass 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 | 73 | 74 | 75 | 76 |
77 |
78 |
79 | 80 | 81 | 82 | 83 |

84 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 85 |

86 |
87 | -------------------------------------------------------------------------------- /phpdoc/default/_TestCases---testassert.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page testassert.php 7 | 8 | 9 | 10 | 11 |
12 |

/TestCases/testassert.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | testassert 43 | 45 | 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---changed_files.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page changed_files.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/changed_files.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 |
31 |
Includes
32 | 37 |
38 | 39 |
40 | 41 |
42 | 43 | include 44 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 45 | (line 2) 46 | 47 |
48 | 49 | 50 | 51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 |
59 |
Functions
60 | 65 |
66 | 67 |
68 | 69 |
70 | get_rpc_reply (line 3) 71 |
72 | 73 | 74 | 75 |
76 | void 77 | 78 | get_rpc_reply 79 | 80 | ( $rpc) 81 |
82 | 83 |
    84 |
  • 85 | 86 | $rpc
  • 87 |
88 | 89 | 90 |
91 |
92 |
93 | 94 |

95 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 96 |

97 |
98 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---chk_expect.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page chk_expect.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/chk_expect.php

13 | 14 | 15 |
16 |
Description
17 | 19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |

31 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 32 |

33 |
34 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---cli_command.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page cli_command.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/cli_command.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---commit_config.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page commit_config.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/commit_config.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:58 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---device_method_missing.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page device_method_missing.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/device_method_missing.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | include 69 | (CommitException.php) 70 | (line 5) 71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | include 83 | (LoadException.php) 84 | (line 6) 85 | 86 |
87 | 88 | 89 | 90 |
91 | 92 |
93 | 94 |
95 | 96 | include 97 | (XML.php) 98 | (line 7) 99 | 100 |
101 | 102 | 103 | 104 |
105 | 106 |
107 | 108 |
109 | 110 | include 111 | (NetconfException.php) 112 | (line 8) 113 | 114 |
115 | 116 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 | 125 |

126 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 127 |

128 |
129 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---device_ssh_session.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page device_ssh_session.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/device_ssh_session.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | include 69 | (CommitException.php) 70 | (line 5) 71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | include 83 | (LoadException.php) 84 | (line 6) 85 | 86 |
87 | 88 | 89 | 90 |
91 | 92 |
93 | 94 |
95 | 96 | include 97 | (XML.php) 98 | (line 7) 99 | 100 |
101 | 102 | 103 | 104 |
105 | 106 |
107 | 108 |
109 | 110 | include 111 | (NetconfException.php) 112 | (line 8) 113 | 114 |
115 | 116 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 | 125 |

126 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 127 |

128 |
129 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---device_text_conf.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page device_text_conf.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/device_text_conf.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | Device 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | include 69 | (CommitException.php) 70 | (line 5) 71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | include 83 | (LoadException.php) 84 | (line 6) 85 | 86 |
87 | 88 | 89 | 90 |
91 | 92 |
93 | 94 |
95 | 96 | include 97 | (XML.php) 98 | (line 7) 99 | 100 |
101 | 102 | 103 | 104 |
105 | 106 |
107 | 108 |
109 | 110 | include 111 | (NetconfException.php) 112 | (line 8) 113 | 114 |
115 | 116 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 | 125 |

126 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 127 |

128 |
129 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---edit_clock.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page edit_clock.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/edit_clock.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---edit_configuration.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page edit_configuration.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/edit_configuration.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---get_chassis_inventory.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page get_chassis_inventory.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/get_chassis_inventory.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/examples/device_method_missing.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---method_missing.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page method_missing.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/method_missing.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | A 43 | 45 | 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---session.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page session.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/session.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | session 43 | 45 | 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---ssh_session.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page ssh_session.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/ssh_session.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/examples/session.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_config.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_config.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_config.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:43:17 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_framework.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_framework.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_framework.php

13 | 14 | 15 |
16 |
Description
17 | 19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |

31 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 32 |

33 |
34 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_load_file.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_load_file.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_load_file.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:43:17 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_method_missing.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_method_missing.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_method_missing.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | (Device.php) 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:43:17 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_operation.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_operation.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_operation.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_operationcommand.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_operationcommand.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_operationcommand.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('netconf-php-master/netconf/Device.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:43:17 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_examples---test_ssh_conf.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page test_ssh_conf.php 7 | 8 | 9 | 10 | 11 |
12 |

/examples/test_ssh_conf.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
Includes
31 | 35 |
36 | 37 |
38 | 39 |
40 | 41 | include 42 | ('/home/automation/Desktop/netconf-php-master/examples/device_ssh_session.php') 43 | (line 2) 44 | 45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---CommitException.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page CommitException.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/CommitException.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | CommitException 43 | 45 | Describes exceptions related to commit operation 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---Device.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page Device.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/Device.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 49 | 50 |
ClassDescription
44 | Device 45 | 47 | 48 |
51 |
52 |
53 | 54 | 55 |
56 |
Includes
57 | 62 |
63 | 64 |
65 | 66 |
67 | 68 | include 69 | ('CommitException.php') 70 | (line 5) 71 | 72 |
73 | 74 | 75 | 76 |
77 | 78 |
79 | 80 |
81 | 82 | include 83 | ('LoadException.php') 84 | (line 6) 85 | 86 |
87 | 88 | 89 | 90 |
91 | 92 |
93 | 94 |
95 | 96 | include 97 | ('XML.php') 98 | (line 7) 99 | 100 |
101 | 102 | 103 | 104 |
105 | 106 |
107 | 108 |
109 | 110 | include 111 | ('NetconfException.php') 112 | (line 8) 113 | 114 |
115 | 116 | 117 | 118 |
119 |
120 |
121 | 122 | 123 | 124 | 125 |

126 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 127 |

128 |
129 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---LoadException.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page LoadException.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/LoadException.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | LoadException 43 | 45 | Describes exceptions related to load operation 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---NetconfException.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page NetconfException.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/NetconfException.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 47 | 48 |
ClassDescription
42 | NetconfException 43 | 45 | Describes exceptions related to establishing Netocnf session. 46 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 |

57 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 58 |

59 |
60 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---XML.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page XML.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/XML.php

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
Classes
31 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 50 | 51 |
ClassDescription
44 | XML 45 | 47 | An
  1. 48 |
object represents XML content and provides methods to manipulate it. 49 |
52 |
53 |
54 | 55 | 56 |
57 |
Includes
58 | 63 |
64 | 65 |
66 | 67 |
68 | 69 | include 70 | ('XMLBuilder.php') 71 | (line 3) 72 | 73 |
74 | 75 | 76 | 77 |
78 |
79 |
80 | 81 | 82 | 83 | 84 |

85 | Documentation generated on Fri, 28 Feb 2014 11:44:20 +0000 by phpDocumentor 1.4.4 86 |

87 |
88 | -------------------------------------------------------------------------------- /phpdoc/default/_netconf---XMLBuilder.php.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs for page XMLBuilder.php 7 | 8 | 9 | 10 | 11 |
12 |

/netconf/XMLBuilder.php

13 | 14 | 15 |
16 |
Description
17 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
Classes
30 | 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 48 | 49 |
ClassDescription
42 | XMLBuilder 43 | 45 | An is used to create an XML object.This is useful to create XML RPC's and configurations. 47 |
50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 |

58 | Documentation generated on Fri, 28 Feb 2014 11:44:21 +0000 by phpDocumentor 1.4.4 59 |

60 |
61 | -------------------------------------------------------------------------------- /phpdoc/default/session.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class session 7 | 8 | 9 | 10 | 11 |
12 |

Class session

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 |

25 | Located in /examples/session.php (line 3) 26 |

27 | 28 | 29 |

 30 | 	
 31 | 			
32 |
33 | 34 | 35 | 36 | 37 | 38 |
39 |
Method Summary
40 | 44 |
45 |
46 | 47 |
48 | void 49 | f1 50 | () 51 |
52 |
53 |
54 |
55 | 56 | 57 | 58 |
59 |
Methods
60 | 65 |
66 | 67 | 68 | 69 |
70 | 71 |
72 | f1 (line 5) 73 |
74 | 75 | 76 |
    77 |
  • access: public
  • 78 |
79 | 80 |
81 | void 82 | 83 | f1 84 | 85 | () 86 |
87 | 88 | 89 | 90 |
91 | 92 |
93 |
94 | 95 | 96 |

97 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 98 |

99 |
100 | -------------------------------------------------------------------------------- /phpdoc/default/testAPIsFunction.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class testAPIsFunction 7 | 8 | 9 | 10 | 11 |
12 |

Class testAPIsFunction

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

26 | Located in /TestCases/testAPIsFunction.php (line 3) 27 |

28 | 29 | 30 |
PHPUnit_Framework_TestCase
 31 |    |
 32 |    --testAPIsFunction
33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 |
41 |
Variable Summary
42 | 49 |
50 |
51 |
52 | mixed 53 | $d 54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
Method Summary
62 | 69 |
70 |
71 | 72 |
73 | void 74 | setup 75 | () 76 |
77 |
78 | void 79 | testConnection 80 | () 81 |
82 |
83 | void 84 | testlock 85 | () 86 |
87 |
88 |
89 |
90 | 91 | 92 |
93 |
Variables
94 | 103 |
104 | 105 |
106 | 107 |
108 | 109 | mixed 110 | $d 111 | (line 5) 112 | 113 |
114 | 115 | 116 |
    117 |
  • access: protected
  • 118 |
119 | 120 | 121 | 122 | 123 | 124 |
125 | 126 |
127 |
128 | 129 | 130 |
131 |
Methods
132 | 138 |
139 | 140 | 141 | 142 |
143 | 144 |
145 | setup (line 7) 146 |
147 | 148 | 149 |
    150 |
  • access: protected
  • 151 |
152 | 153 |
154 | void 155 | 156 | setup 157 | 158 | () 159 |
160 | 161 | 162 | 163 |
164 | 165 |
166 | 167 |
168 | testConnection (line 12) 169 |
170 | 171 | 172 |
    173 |
  • access: public
  • 174 |
175 | 176 |
177 | void 178 | 179 | testConnection 180 | 181 | () 182 |
183 | 184 | 185 | 186 |
187 | 188 |
189 | 190 |
191 | testlock (line 29) 192 |
193 | 194 | 195 |
    196 |
  • access: public
  • 197 |
198 | 199 |
200 | void 201 | 202 | testlock 203 | 204 | () 205 |
206 | 207 | 208 | 209 |
210 | 211 |
212 |
213 | 214 | 215 |

216 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 217 |

218 |
219 | -------------------------------------------------------------------------------- /phpdoc/default/testClass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class testClass 7 | 8 | 9 | 10 | 11 |
12 |

Class testClass

13 | 14 | 15 |
16 |
Description
17 | 23 |
24 | 25 |

26 | Located in /TestCases/testClass.php (line 4) 27 |

28 | 29 | 30 |
PHPUnit_Framework_TestCase
 31 |    |
 32 |    --testClass
33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 |
41 |
Variable Summary
42 | 49 |
50 |
51 |
52 | mixed 53 | $d 54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
Method Summary
62 | 69 |
70 |
71 | 72 |
73 | void 74 | testclose 75 | () 76 |
77 |
78 | void 79 | testExecute 80 | () 81 |
82 |
83 |
84 |
85 | 86 | 87 |
88 |
Variables
89 | 98 |
99 | 100 |
101 | 102 |
103 | 104 | mixed 105 | $d 106 | (line 5) 107 | 108 |
109 | 110 | 111 |
    112 |
  • access: protected
  • 113 |
114 | 115 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 | 124 | 125 |
126 |
Methods
127 | 133 |
134 | 135 | 136 | 137 |
138 | 139 |
140 | testclose (line 27) 141 |
142 | 143 | 144 |
    145 |
  • access: public
  • 146 |
147 | 148 |
149 | void 150 | 151 | testclose 152 | 153 | () 154 |
155 | 156 | 157 | 158 |
159 | 160 |
161 | 162 |
163 | testExecute (line 7) 164 |
165 | 166 | 167 |
    168 |
  • access: public
  • 169 |
170 | 171 |
172 | void 173 | 174 | testExecute 175 | 176 | () 177 |
178 | 179 | 180 | 181 |
182 | 183 |
184 |
185 | 186 | 187 |

188 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 189 |

190 |
191 | -------------------------------------------------------------------------------- /phpdoc/default/testassert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Docs For Class testassert 7 | 8 | 9 | 10 | 11 |
12 |

Class testassert

13 | 14 | 15 |
16 |
Description
17 | 22 |
23 | 24 |

25 | Located in /TestCases/testassert.php (line 4) 26 |

27 | 28 | 29 |
PHPUnit_Framework_TestCase
 30 |    |
 31 |    --testassert
32 | 33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 |
41 |
Method Summary
42 | 46 |
47 |
48 | 49 |
50 | void 51 | testcheckassert 52 | () 53 |
54 |
55 |
56 |
57 | 58 | 59 | 60 |
61 |
Methods
62 | 67 |
68 | 69 | 70 | 71 |
72 | 73 |
74 | testcheckassert (line 6) 75 |
76 | 77 | 78 |
    79 |
  • access: public
  • 80 |
81 | 82 |
83 | void 84 | 85 | testcheckassert 86 | 87 | () 88 |
89 | 90 | 91 | 92 |
93 | 94 |
95 |
96 | 97 | 98 |

99 | Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by phpDocumentor 1.4.4 100 |

101 |
102 | -------------------------------------------------------------------------------- /phpdoc/errors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | phpDocumentor Parser Errors and Warnings 7 | 8 | 9 | 10 | 11 | Post-parsing
12 | Device.php
13 | LoadException.php
14 | NetconfException.php
15 | XML.php
16 | XMLBuilder.php
17 | 18 |

CommitException.php

19 |

Warnings:


20 | Warning on line 5 - no @package tag was used in a DocBlock for class CommitException
21 | Warning on line 16 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/CommitException.php" has no page-level DocBlock, use @package in the first DocBlock to create one
22 | 23 |

Device.php

24 |

Warnings:


25 | Warning on line 11 - no @package tag was used in a DocBlock for class Device
26 | Warning on line 884 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/Device.php" has no page-level DocBlock, use @package in the first DocBlock to create one
27 | 28 |

LoadException.php

29 |

Warnings:


30 | Warning on line 5 - no @package tag was used in a DocBlock for class LoadException
31 | Warning on line 16 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/LoadException.php" has no page-level DocBlock, use @package in the first DocBlock to create one
32 | 33 |

NetconfException.php

34 |

Warnings:


35 | Warning on line 5 - no @package tag was used in a DocBlock for class NetconfException
36 | Warning on line 16 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/NetconfException.php" has no page-level DocBlock, use @package in the first DocBlock to create one
37 | 38 |

XML.php

39 |

Warnings:


40 | Warning on line 18 - no @package tag was used in a DocBlock for class XML
41 | Warning on line 325 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/XML.php" has no page-level DocBlock, use @package in the first DocBlock to create one
42 | 43 |

XMLBuilder.php

44 |

Warnings:


45 | Warning on line 13 - no @package tag was used in a DocBlock for class XMLBuilder
46 | Warning on line 126 - File "/home/automation/Desktop/NETCONF-PHP-APIs/NETCONF-PHP-APIs/netconf/XMLBuilder.php" has no page-level DocBlock, use @package in the first DocBlock to create one
47 |

Errors:


48 | Error on line 19 - Unclosed code tag in DocBlock, parsing will be incorrect
49 |

50 | Documentation generated on Fri, 28 Feb 2014 11:44:21 +0000 by phpDocumentor 1.4.4 51 |

52 | 53 | -------------------------------------------------------------------------------- /phpdoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | NETCONF-PHP-APIs 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | <H2>Frame Alert</H2> 20 | <P>This document is designed to be viewed using the frames feature. 21 | If you see this message, you are using a non-frame-capable web client.</P> 22 | 23 | 24 | -------------------------------------------------------------------------------- /phpdoc/li_default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
default
12 |
13 | 14 |
15 | 16 |
Description
17 |
18 | Class trees
19 | Index of elements
20 |
21 | 22 | 23 | 24 |
Classes
25 |
CommitException
26 |
Device
27 |
LoadException
28 |
NetconfException
29 |
XML
30 |
XMLBuilder
31 |
Files
32 |
CommitException.php
33 |
Device.php
34 |
LoadException.php
35 |
NetconfException.php
36 |
XML.php
37 |
XMLBuilder.php
38 | 39 | 40 |
41 |
42 |

phpDocumentor v 1.4.4

43 | 44 | -------------------------------------------------------------------------------- /phpdoc/media/banner.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-color: #CCCCFF; 4 | margin: 0px; 5 | padding: 0px; 6 | } 7 | 8 | /* Banner (top bar) classes */ 9 | 10 | .banner { } 11 | 12 | .banner-menu 13 | { 14 | clear: both; 15 | padding: .5em; 16 | border-top: 2px solid #6666AA; 17 | } 18 | 19 | .banner-title 20 | { 21 | text-align: right; 22 | font-size: 20pt; 23 | font-weight: bold; 24 | margin: .2em; 25 | } 26 | 27 | .package-selector 28 | { 29 | background-color: #AAAADD; 30 | border: 1px solid black; 31 | color: yellow; 32 | } 33 | -------------------------------------------------------------------------------- /phpdoc/media/stylesheet.css: -------------------------------------------------------------------------------- 1 | a { color: #336699; text-decoration: none; } 2 | a:hover { color: #6699CC; text-decoration: underline; } 3 | a:active { color: #6699CC; text-decoration: underline; } 4 | 5 | body { background : #FFFFFF; } 6 | body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt } 7 | p, li { line-height: 140% } 8 | a img { border: 0px; } 9 | dd { margin-left: 0px; padding-left: 1em; } 10 | 11 | /* Page layout/boxes */ 12 | 13 | .info-box {} 14 | .info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF } 15 | .info-box-body { border: 1px solid #999999; padding: .5em; } 16 | .nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } 17 | 18 | .oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} 19 | .evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} 20 | 21 | .page-body { max-width: 800px; margin: auto; } 22 | .tree dl { margin: 0px } 23 | 24 | /* Index formatting classes */ 25 | 26 | .index-item-body { margin-top: .5em; margin-bottom: .5em} 27 | .index-item-description { margin-top: .25em } 28 | .index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } 29 | .index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} 30 | .index-letter-title { font-size: 12pt; font-weight: bold } 31 | .index-letter-menu { text-align: center; margin: 1em } 32 | .index-letter { font-size: 12pt } 33 | 34 | /* Docbook classes */ 35 | 36 | .description {} 37 | .short-description { font-weight: bold; color: #666666; } 38 | .tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } 39 | .parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } 40 | .redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } 41 | .package { } 42 | .package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } 43 | .package-details { font-size: 85%; } 44 | .sub-package { font-weight: bold; font-size: 120% } 45 | .tutorial { border-width: thin; border-color: #0066ff } 46 | .tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } 47 | .nav-button-disabled { color: #999999; } 48 | .nav-button:active, 49 | .nav-button:focus, 50 | .nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none } 51 | .folder-title { font-style: italic } 52 | 53 | /* Generic formatting */ 54 | 55 | .field { font-weight: bold; } 56 | .detail { font-size: 8pt; } 57 | .notes { font-style: italic; font-size: 8pt; } 58 | .separator { background-color: #999999; height: 2px; } 59 | .warning { color: #FF6600; } 60 | .disabled { font-style: italic; color: #999999; } 61 | 62 | /* Code elements */ 63 | 64 | .line-number { } 65 | 66 | .class-table { width: 100%; } 67 | .class-table-header { border-bottom: 1px dotted #666666; text-align: left} 68 | .class-name { color: #000000; font-weight: bold; } 69 | 70 | .method-summary { padding-left: 1em; font-size: 8pt } 71 | .method-header { } 72 | .method-definition { margin-bottom: .3em } 73 | .method-title { font-weight: bold; } 74 | .method-name { font-weight: bold; } 75 | .method-signature { font-size: 85%; color: #666666; margin: .5em 0em } 76 | .method-result { font-style: italic; } 77 | 78 | .var-summary { padding-left: 1em; font-size: 8pt; } 79 | .var-header { } 80 | .var-title { margin-bottom: .3em } 81 | .var-type { font-style: italic; } 82 | .var-name { font-weight: bold; } 83 | .var-default {} 84 | .var-description { font-weight: normal; color: #000000; } 85 | 86 | .include-title { } 87 | .include-type { font-style: italic; } 88 | .include-name { font-weight: bold; } 89 | 90 | .const-title { } 91 | .const-name { font-weight: bold; } 92 | 93 | /* Syntax highlighting */ 94 | 95 | .src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; } 96 | .src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; } 97 | 98 | .src-comm { color: green; } 99 | .src-id { } 100 | .src-inc { color: #0000FF; } 101 | .src-key { color: #0000FF; } 102 | .src-num { color: #CC0000; } 103 | .src-str { color: #66cccc; } 104 | .src-sym { font-weight: bold; } 105 | .src-var { } 106 | 107 | .src-php { font-weight: bold; } 108 | 109 | .src-doc { color: #009999 } 110 | .src-doc-close-template { color: #0000FF } 111 | .src-doc-coretag { color: #0099FF; font-weight: bold } 112 | .src-doc-inlinetag { color: #0099FF } 113 | .src-doc-internal { color: #6699cc } 114 | .src-doc-tag { color: #0080CC } 115 | .src-doc-template { color: #0000FF } 116 | .src-doc-type { font-style: italic } 117 | .src-doc-var { font-style: italic } 118 | 119 | .tute-tag { color: #009999 } 120 | .tute-attribute-name { color: #0000FF } 121 | .tute-attribute-value { color: #0099FF } 122 | .tute-entity { font-weight: bold; } 123 | .tute-comment { font-style: italic } 124 | .tute-inline-tag { color: #636311; font-weight: bold } 125 | 126 | /* tutorial */ 127 | 128 | .authors { } 129 | .author { font-style: italic; font-weight: bold } 130 | .author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } 131 | .example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } 132 | *[class="example"] { line-height : 0.5em } 133 | .listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } 134 | *[class="listing"] { line-height : 0.5em } 135 | .release-info { font-size: 85%; font-style: italic; margin: 1em 0em } 136 | .ref-title-box { } 137 | .ref-title { } 138 | .ref-purpose { font-style: italic; color: #666666 } 139 | .ref-synopsis { } 140 | .title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF } 141 | .cmd-synopsis { margin: 1em 0em } 142 | .cmd-title { font-weight: bold } 143 | .toc { margin-left: 2em; padding-left: 0em } 144 | 145 | -------------------------------------------------------------------------------- /phpdoc/packages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 26 | 27 | -------------------------------------------------------------------------------- /phpdoc/todolist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Todo List 7 | 8 | 9 | 10 | 11 |

Todo List

12 |

default

13 |

DeviceTest::testClose()

14 | 17 |

DeviceTest::testClose_configuration()

18 | 21 |

DeviceTest::testCommit()

22 | 25 |

DeviceTest::testCommit_confirm()

26 | 29 |

DeviceTest::testConnect()

30 | 33 |

DeviceTest::testExecute_rpc()

34 | 37 |

DeviceTest::testLoad_set_configuration()

38 | 41 |

DeviceTest::testLoad_set_file()

42 | 45 |

DeviceTest::testLoad_text_configuration()

46 | 49 |

DeviceTest::testLoad_text_file()

50 | 53 |

DeviceTest::testLoad_xml_configuration()

54 | 57 |

DeviceTest::testLoad_xml_file()

58 | 61 |

DeviceTest::testLock_config()

62 | 65 |

DeviceTest::testOpen_configuration()

66 | 69 |

DeviceTest::testUnlock_config()

70 | 73 |

DeviceTest::testValidate()

74 | 77 |

78 | Documentation generated on Thu, 27 Feb 2014 13:56:00 +0000 by phpDocumentor 1.4.4 79 |

80 | 81 | -------------------------------------------------------------------------------- /tests/unit/DeviceTest.php: -------------------------------------------------------------------------------- 1 | connect(); 17 | $conn= self::$d->last_rpc_reply; 18 | $this->assertGreaterThan(-1,strpos($conn, "")); 19 | } 20 | 21 | /** 22 | * @covers Device::execute_rpc 23 | * @todo Implement testExecute_rpc(). 24 | * @depends testConnect 25 | */ 26 | public function testExecute_rpc() { 27 | self::$d->execute_rpc("get-alarm-information"); 28 | $exe=self::$d->last_rpc_reply; 29 | $this->assertGreaterThan(-1,strpos($exe,"rpc-reply")); 30 | $this->assertGreaterThan(-1, strpos($exe,"alarm")); 31 | $this->assertFalse(strpos($exe,"error")); 32 | } 33 | 34 | /** 35 | * @covers Device::lock_config 36 | * @todo Implement testLock_config(). 37 | * @depends testConnect 38 | */ 39 | public function testLock_config() { 40 | self::$d->lock_config(); 41 | $isloc= self::$d->last_rpc_reply; 42 | $this->assertGreaterThan(-1,strpos($isloc,"rpc-reply")); 43 | $this->assertGreaterThan(-1,strpos($isloc,"")); 44 | } 45 | 46 | 47 | /** 48 | * @covers Device::load_xml_configuration 49 | * @todo Implement testLoad_xml_configuration(). 50 | * @depends testConnect 51 | * @depends testLock_config 52 | */ 53 | public function testLoad_xml_configuration() { 54 | $str1= ""; 55 | self::$d->load_xml_configuration($str1, "merge"); 56 | $isloaded= self::$d->last_rpc_reply; 57 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 58 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 59 | } 60 | 61 | /** 62 | * @covers Device::load_text_configuration 63 | * @todo Implement testLoad_text_configuration(). 64 | * @depends testConnect 65 | * @depends testLock_config 66 | */ 67 | public function testLoad_text_configuration() { 68 | $str1= "system { services {ftp; }}"; 69 | self::$d->load_text_configuration($str1, "merge"); 70 | $isloaded= self::$d->last_rpc_reply; 71 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 72 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 73 | } 74 | 75 | /** 76 | * @covers Device::load_set_configuration 77 | * @todo Implement testLoad_set_configuration(). 78 | * @depends testConnect 79 | * @depends testLock_config 80 | */ 81 | public function testLoad_set_configuration() { 82 | $str1= "set system services ftp"; 83 | self::$d->load_set_configuration($str1); 84 | $isloaded= self::$d->last_rpc_reply; 85 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 86 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 87 | } 88 | 89 | /** 90 | * @covers Device::commit 91 | * @todo Implement testCommit(). 92 | * @depends testConnect 93 | * @depends testLock_config 94 | */ 95 | public function testCommit() { 96 | self::$d->commit(); 97 | $comm=self::$d->last_rpc_reply; 98 | $this->assertGreaterThan(-1,strpos($comm,"rpc-reply")); 99 | $this->assertGreaterThan(-1,strpos($comm,"")); 100 | } 101 | 102 | /** 103 | * @covers Device::commit_confirm 104 | * @todo Implement testCommit_confirm(). 105 | * @depends testConnect 106 | */ 107 | public function testCommit_confirm() { 108 | self::$d->commit_confirm(40); 109 | $ccon= self::$d->last_rpc_reply; 110 | $this->assertGreaterThan(-1,strpos($ccon,"rpc-reply")); 111 | $this->assertGreaterThan(-1,strpos($ccon,"")); 112 | } 113 | 114 | /** 115 | * @covers Device::validate 116 | * @todo Implement testValidate(). 117 | * @depends testConnect 118 | */ 119 | public function testValidate() { 120 | self::$d->validate(); 121 | $val= self::$d->last_rpc_reply; 122 | $this->assertGreaterThan(-1,strpos($val,"rpc-reply")); 123 | $this->assertGreaterThan(-1, strpos($val,"")); 124 | } 125 | 126 | /** 127 | * @covers Device::load_xml_file 128 | * @todo Implement testLoad_xml_file(). 129 | * @depends testConnect 130 | * depends testLock_Config 131 | */ 132 | public function testLoad_xml_file() { 133 | self::$d->load_xml_file("/path/of/file"); 134 | $isloaded= self::$d->last_rpc_reply; 135 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 136 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 137 | } 138 | 139 | 140 | /** 141 | * @covers Device::load_text_file 142 | * @todo Implement testLoad_text_file(). 143 | * depends testConnect 144 | * depends testLoad_config 145 | */ 146 | public function testLoad_text_file() { 147 | self::$d->load_text_file("/path/of/file"); 148 | $isloaded= self::$d->last_rpc_reply; 149 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 150 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 151 | } 152 | 153 | /** 154 | * @covers Device::load_set_file 155 | * @todo Implement testLoad_set_file(). 156 | * @depends testConnect 157 | * @depends testLock_config 158 | */ 159 | public function testLoad_set_file() { 160 | self::$d->load_set_file("path/of/file"); 161 | $isloaded= self::$d->last_rpc_reply; 162 | $this->assertGreaterThan(-1,strpos($isloaded,"rpc-reply")); 163 | $this->assertGreaterThan(-1,strpos($isloaded,"")); 164 | } 165 | 166 | /** 167 | * @covers Device::get_running_config 168 | * @todo Implement testGet_running_config(). 169 | * depends testConnect 170 | */ 171 | public function testGet_running_config() { 172 | self::$d->get_running_config(); 173 | $run_conf= self::$d->last_rpc_reply; 174 | $this->assertGreaterThan(-1, strpos($run_conf,"rpc-reply")); 175 | $this->assertGreaterThan(-1, strpos($run_conf,"")); 176 | } 177 | 178 | /** 179 | * @covers Device::unlock_config 180 | * @todo Implement testUnlock_config(). 181 | * @depends testConnect 182 | * @depends testLock_config 183 | */ 184 | public function testUnlock_config() { 185 | self::$d->unlock_config(); 186 | $isloc= self::$d->last_rpc_reply; 187 | $this->assertGreaterThan(-1,strpos($isloc,"rpc-reply")); 188 | $this->assertGreaterThan(-1,strpos($isloc,"")); 189 | } 190 | 191 | 192 | /** 193 | * @covers Device::open_configuration 194 | * @todo Implement testOpen_configuration(). 195 | * @depends testConnect 196 | * @depends testUnlock_config 197 | 198 | */ 199 | public function testOpen_configuration() { 200 | self::$d->open_configuration(); 201 | $open_conn= self::$d->last_rpc_reply; 202 | $this->assertGreaterThan(-1,strpos($open_conn,"warning")); 203 | } 204 | 205 | /** 206 | * @covers Device::close_configuration 207 | * @todo Implement testClose_configuration(). 208 | * @depends testConnect 209 | * @depends testOpen_configuration 210 | */ 211 | public function testClose_configuration() { 212 | self::$d->close_configuration(); 213 | $close_conf= self::$d->last_rpc_reply; 214 | $this->assertGreaterThan(-1,strpos($close_conf,"rpc-reply")); 215 | } 216 | 217 | /** 218 | * @covers Device::close 219 | * @todo Implement testClose(). 220 | * @depends testConnect 221 | */ 222 | public function testClose() { 223 | self::$d->close(); 224 | $c= self::$d->last_rpc_reply; 225 | $this->assertGreaterThan(-1,strpos($c,"rpc-reply")); 226 | } 227 | } 228 | 229 | ?> 230 | --------------------------------------------------------------------------------