Example #1
0
def nostest(host, username, password):
    # Driver
    driver = nos.NOSdriver()

    # Neutron operations
    vlan = 1001
    mac = '0050.56bf.0001'
    driver.create_network(host, username, password, vlan)
    driver.associate_mac_to_network(host, username, password, vlan, mac)
    driver.dissociate_mac_from_network(host, username, password, vlan, mac)
    driver.delete_network(host, username, password, vlan)

    # AMPP enumeration
    with driver.connect(host, username, password) as mgr:
        print(driver.get_port_profiles(mgr))
        print(driver.get_port_profile(mgr, 'default'))
Example #2
0
 def __init__(self, host, username, password):
     self.host = host
     self.username = username
     self.password = password
     self.driver = nos.NOSdriver()