MCPcopy Create free account
hub / github.com/Juniper/netconf-java / main

Method main

examples/ShowChassis.java:16–33  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

14
15public class ShowChassis {
16 public static void main(String[] args) throws
17 SAXException, IOException {
18
19 Device device = CreateDevice.createDevice();
20 device.connect();
21
22 //Send RPC and receive RPC Reply as XML
23 XML rpc_reply = device.executeRPC("get-chassis-inventory");
24 /* OR
25 * device.executeRPC("<get-chassis-inventory/>");
26 * OR
27 * device.executeRPC("<rpc><get-chassis-inventory/></rpc>");
28 */
29
30 //Print the RPC-Reply and close the device.
31 System.out.println(rpc_reply.toString());
32 device.close();
33 }
34}

Callers

nothing calls this directly

Calls 5

createDeviceMethod · 0.95
connectMethod · 0.95
executeRPCMethod · 0.95
toStringMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected