MCPcopy Index your code
hub / github.com/Juniper/netconf-java / main

Method main

examples/parse_system_info.java:30–54  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

28
29public class parse_system_info {
30 public static void main(String[] args) throws
31 SAXException, IOException {
32
33 Device device = CreateDevice.createDevice();
34 device.connect();
35
36 //Send RPC and receive RPC Reply as XML
37 XML rpc_reply = device.executeRPC("get-system-information");
38 List<String> list1 = Arrays.asList("system-information","hardware-model");
39 List<String> list2 = Arrays.asList("system-information","os-name");
40 List<String> list3 = Arrays.asList("system-information","os-version");
41 List<String> list4 = Arrays.asList("system-information","host-name");
42
43 String val1= rpc_reply.findValue(list1);
44 String val2= rpc_reply.findValue(list2);
45 String val3= rpc_reply.findValue(list3);
46 String val4= rpc_reply.findValue(list4);
47
48 System.out.println(val1);
49 System.out.println(val2);
50 System.out.println(val3);
51 System.out.println(val4);
52
53 device.close();
54 }
55}

Callers

nothing calls this directly

Calls 5

createDeviceMethod · 0.95
connectMethod · 0.95
executeRPCMethod · 0.95
findValueMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected