source: n4d-network/trunk/fuentes/example_init_vars.py @ 144

Last change on this file since 144 was 144, checked in by hectorgh, 4 years ago

adding project files

  • Property svn:executable set to *
File size: 666 bytes
Line 
1#!/usr/bin/python
2import xmlrpclib
3
4ip_server = '10.0.0.195'
5c = xmlrpclib.ServerProxy("https://"+ip_server+":9779")
6#c = xmlrpclib.ServerProxy("https://192.168.1.2:9779")
7user = ("lliurex","lliurex")
8
9#print c.get_methods('SambaManager')
10print c.set_internal_interface(user,'NetworkManager','eth0')
11#print c.set_external_interface(user,'NetworkManager','eth1')
12#print c.interface_static(user,'NetworkManager','eth0','10.2.1.254','255.255.255.0')
13#print c.interface_dhcp(user,'NetworkManager','eth1')
14#print c.restart_interfaces(user,'NetworkManager')
15#restore : adm admins
16#print c.init_network_vars(user,'NetworkManager')
17#test : * anonymous
18#backup : adm admins
Note: See TracBrowser for help on using the repository browser.