################################################################################

ixNet.connect(py.ixTclServer, '-port', py.ixTclPort, '-version', '7.40')

################################################################################
# Cleaning up IxNetwork
################################################################################
print "Cleaning up IxNetwork..."
ixNet.execute('newConfig')

################################################################################
# Adding ports to configuration
################################################################################
print "Adding ports to configuration"
root = ixNet.getRoot()
ixNet.add(root, 'vport')
ixNet.add(root, 'vport')
ixNet.commit()
vPorts = ixNet.getList(root, 'vport')
vport1 = vPorts[0]
vport2 = vPorts[1]

################################################################################
# Adding IPv4 endpoints to configuration
################################################################################
print "Add topologies"
ixNet.add(root, 'topology')
ixNet.add(root, 'topology')
ixNet.commit()

topo1 = ixNet.getList(root, 'topology')[0]
Esempio n. 2
0
################################################################################

ixNet.connect(py.ixTclServer, '-port', py.ixTclPort, '-version', '7.40')

################################################################################
# Cleaning up IxNetwork
################################################################################
print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

################################################################################
# Adding ports to configuration
################################################################################
print("Adding ports to configuration")
root = ixNet.getRoot()
ixNet.add(root, 'vport')
ixNet.add(root, 'vport')
ixNet.commit()
vPorts = ixNet.getList(root, 'vport')
vport1 = vPorts[0]
vport2 = vPorts[1]

################################################################################
# Configuring IPv6 Autoconfiguration
################################################################################
print("Add topologies")
ixNet.add(root, 'topology')
ixNet.add(root, 'topology')
ixNet.commit()

topo1 = ixNet.getList(root, 'topology')[0]
Esempio n. 3
0
print("Connecting to the server")
ixNet.connect('10.39.65.1', '-setAttribute', 'strict', '-port', 9863,
              '-version', '9.00')

print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

root = ixNet.getRoot()

print("\nAdd virtual ports to configuration...")
vports = ixNet.getList(ixNet.getRoot(), 'vport')

print('Add chassis in IxNetwork...')
chassis = '10.39.64.117'
availableHardwareId = ixNet.getRoot() + 'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()
time.sleep(5)

###############################################################################
# 1. Adding ports to configuration
################################################################################
print "Adding ports to configuration"
root = ixNet.getRoot()
ixNet.add(root, 'vport')
ixNet.add(root, 'vport')
ixNet.commit()
vPorts = ixNet.getList(root, 'vport')
vport1 = vPorts[0]
vport2 = vPorts[1]
print("Assigning ports from " + chassis + " to " + str(vports) + " ...")
# create an instance of the IxNet class
ixNet = IxNet()

# create absolute path for the config and load it
print("Connecting to server: localhost")
ixNet.connect('localhost', '-port', 8009, '-version', '7.30')

print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

# all objects are under root
root = ixNet.getRoot()

print("\nAdd virtual ports to configuration...")
vports = []
vports.append(ixNet.add(root, 'vport'))
vports.append(ixNet.add(root, 'vport'))
ixNet.commit()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')

print('Add chassis in IxNetwork...')
chassis = '10.205.15.184'
availableHardwareId = ixNet.getRoot() + 'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()

print("Assigning ports from " + chassis + " to " + str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo',
                   '/availableHardware/chassis:"10.205.15.184"/card:9/port:2')
Esempio n. 5
0
# create an instance of the IxNet class
ixNet = IxNet()

# create absolute path for the config and load it
print("Connecting to server: localhost")
ixNet.connect('localhost', '-port', 8009, '-version', '7.40')

print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

# all objects are under root
root = ixNet.getRoot()

print("\nAdd virtual ports to configuration...")
vports = []
vports.append(ixNet.add(root, 'vport'))
vports.append(ixNet.add(root, 'vport'))
ixNet.commit()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')
print('Add chassis in IxNetwork...')
chassis = '10.205.15.90'
availableHardwareId = ixNet.getRoot() + 'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()

print("Assigning ports from " + chassis + " to " + str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo',
                   '/availableHardware/chassis:"10.205.15.90"/card:1/port:1')
ixNet.setAttribute(vports[1], '-connectedTo',
# create an instance of the IxNet class
ixNet = IxNet()

# create absolute path for the config and load it
print ("Connecting to server: localhost")
ixNet.connect('localhost', '-port', 8009, '-version', '7.30')

print ("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

# all objects are under root
root = ixNet.getRoot()

print ("\nAdd virtual ports to configuration...")
vports = []
vports.append(ixNet.add(root, 'vport'))
vports.append(ixNet.add(root, 'vport'))
ixNet.commit()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')

print ('Add chassis in IxNetwork...')
chassis = '10.205.15.184'
availableHardwareId = ixNet.getRoot()+'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()


print ("Assigning ports from " + chassis + " to "+ str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo', '/availableHardware/chassis:"10.205.15.184"/card:9/port:2')
################################################################################

ixNet.connect(py.ixTclServer, '-port', py.ixTclPort, '-version', '7.40')

################################################################################
# Cleaning up IxNetwork
################################################################################
print "Cleaning up IxNetwork..."
ixNet.execute('newConfig')

################################################################################
# Adding ports to configuration
################################################################################
print "Adding ports to configuration"
root = ixNet.getRoot()
ixNet.add(root, 'vport')
ixNet.add(root, 'vport')
ixNet.commit()
vPorts = ixNet.getList(root, 'vport')
vport1 = vPorts[0]
vport2 = vPorts[1]

################################################################################
# Adding VXLAN Protocol
################################################################################

print "Add topologies"
ixNet.add(root, 'topology')
ixNet.add(root, 'topology')
ixNet.commit()
Esempio n. 8
0
################################################################################

ixNet.connect(py.ixTclServer, '-port', py.ixTclPort, '-version', '7.40')

################################################################################
# Cleaning up IxNetwork
################################################################################
print ("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

################################################################################
# Adding ports to configuration
################################################################################
print ("Adding ports to configuration")
root = ixNet.getRoot()
ixNet.add(root, 'vport')
ixNet.add(root, 'vport')
ixNet.commit()
vPorts = ixNet.getList(root, 'vport')
vport1 = vPorts[0]
vport2 = vPorts[1]

################################################################################
# Adding IPv4 endpoints to configuration
################################################################################
print ("Add topologies")
ixNet.add(root, 'topology')
ixNet.add(root, 'topology')
ixNet.commit()

topo1 = ixNet.getList(root, 'topology')[0]
Esempio n. 9
0
ixNet = IxNet()
import time

print("Connecting to TCL Server...")
ixNet.connect('127.0.0.1', '-version', applicationVersion, '-port', '8449')
ixNet.execute('newConfig')
root = ixNet.getRoot()
availableHW = ixNet.getRoot() + 'availableHardware'

#------------------------------------
# Adding chassis
#------------------------------------

print("Adding chassis to the configuration")
chassis1 = ixNet.add(availableHW, 'chassis')
chassis1ID = ixNet.remapIds(chassis1)[0]

ixNet.setAttribute(chassis1ID, '-hostname', chassisIP)
ixNet.commit()

#------------------------------------
# Adding 2 ports
#------------------------------------

print("Adding offline ports to the configuration")
vport1 = ixNet.add(root, 'vport')
ixNet.commit()
vport1ID = ixNet.remapIds(vport1)[0]

vport2 = ixNet.add(root, 'vport')
Esempio n. 10
0
ixNet.connect('localhost', '-port', 8009, '-version', '7.40')

print("Cleaning up IxNetwork...")

ixNet.execute('newConfig')

# all objects are under root

root = ixNet.getRoot()

print("\nAdd one virtual port to configuration...")

vports = []

vports.append(ixNet.add(root, 'vport'))

ixNet.commit()

# get virtual ports

vports = ixNet.getList(ixNet.getRoot(), 'vport')

print('Add chassis in IxNetwork...')

chassis = '10.205.15.184'

availableHardwareId = ixNet.getRoot() + 'availableHardware'

ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
Esempio n. 11
0
print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

config_file = "bonded_gre_sample_script.ixncfg"

print("Loading sample configuration " + config_file + "...")
ixNet.execute('loadConfig', ixNet.readFrom(config_file))
print("Successfully loaded .ixncfg file !!!")
root = ixNet.getRoot()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')
print('Add chassis in IxNetwork...')
chassis = '10.39.64.117'
availableHardwareId = ixNet.getRoot() + 'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()
vport1 = vports[0]
vport2 = vports[1]
print("Assigning ports from " + chassis + " to " + str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo',
                   '/availableHardware/chassis:"10.39.64.117"/card:2/port:5')
ixNet.setAttribute(vports[1], '-connectedTo',
                   '/availableHardware/chassis:"10.39.64.117"/card:2/port:6')
ixNet.commit()
time.sleep(5)

print(
    "*************************************************************************************************"
)
print('\n\nCreate  Home Gateway topology \n\n')
Esempio n. 12
0
from IxNetwork import IxNet

ixNet       = IxNet()

print ("Connecting to the server")
ixNet.connect('ixro-smqa-r-22', '-setAttribute', 'strict', '-port', 8009, '-version', '7.40')

print ("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

# all objects are under root
root = ixNet.getRoot()

print ("\nAdd virtual ports to configuration...")
vports = []
vports.append(ixNet.add(root, 'vport'))
vports.append(ixNet.add(root, 'vport'))
ixNet.commit()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')

print ('Add chassis in IxNetwork...')
chassis = '10.205.15.90'
availableHardwareId = ixNet.getRoot()+'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()

print ("Assigning ports from " + chassis + " to "+ str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo', '/availableHardware/chassis:"10.205.15.90"/card:11/port:3')
ixNet.setAttribute(vports[1], '-connectedTo', '/availableHardware/chassis:"10.205.15.90"/card:11/port:4')
Esempio n. 13
0
from IxNetwork import IxNet

ixNet = IxNet()

print("Connecting to the server")
ixNet.connect('10.39.64.169', '-setAttribute', 'strict', '-port', 8876,
              '-version', '9.00')

print("Cleaning up IxNetwork...")
ixNet.execute('newConfig')

root = ixNet.getRoot()

print("\nAdd virtual ports to configuration...")
vports = []
vports.append(ixNet.add(root, 'vport'))
vports.append(ixNet.add(root, 'vport'))
ixNet.commit()

# get virtual ports
vports = ixNet.getList(ixNet.getRoot(), 'vport')

print('Add chassis in IxNetwork...')
chassis = '10.39.65.151'
availableHardwareId = ixNet.getRoot() + 'availableHardware'
ixNet.add(availableHardwareId, 'chassis', '-hostname', chassis)
ixNet.commit()

print("Assigning ports from " + chassis + " to " + str(vports) + " ...")
ixNet.setAttribute(vports[0], '-connectedTo',
                   '/availableHardware/chassis:"10.39.65.151"/card:9/port:1')