Python Api
2.0
|
api for device & interface More...
Functions | |
def | netbrain.sysapi.datamodel.QueryDeviceObjects (query) |
query device object More... | |
def | netbrain.sysapi.datamodel.QueryDeviceIds (query) |
query device id list by query More... | |
def | netbrain.sysapi.datamodel.SetDeviceObject (device, deviceObj) |
set device object More... | |
def | netbrain.sysapi.datamodel.AddDeviceObject (deviceObj) |
Add device object. More... | |
def | netbrain.sysapi.datamodel.GetDeviceObject (device) |
Get device object by device name. More... | |
def | netbrain.sysapi.datamodel.GetDeviceObjectById (devId) |
Get device object by device id. More... | |
def | netbrain.sysapi.datamodel.GetDeviceNameFromIp (strIp) |
Get device name by IP(interface ips.ip) More... | |
def | netbrain.sysapi.datamodel.SetDeviceProperty (property_name, device_name, value) |
Set device property. More... | |
def | netbrain.sysapi.datamodel.GetDeviceProperty (property_name, device_name) |
Get device property. More... | |
def | netbrain.sysapi.datamodel.QueryInterfaceIds (query, intf_type) |
Get interface id list by intf type. More... | |
def | netbrain.sysapi.datamodel.QueryInterfaceObjects (query, intf_type) |
Get interface id list by intf type. More... | |
def | netbrain.sysapi.datamodel.SetInterfaceObject (device, intf_name, intf_type, intf_object) |
Set interface object. More... | |
def | netbrain.sysapi.datamodel.GetInterfaceObject (device, intf_name, intf_type) |
Get interface object by device name, interface name. More... | |
def | netbrain.sysapi.datamodel.GetInterfaceObjectById (intf_id, intf_type) |
Get interface object by interface id. More... | |
def | netbrain.sysapi.datamodel.GetInterfaceIdsByDeviceName (device, intf_type) |
Get interface id list by device name. More... | |
def | netbrain.sysapi.datamodel.GetDeviceInterfaceId (device, phantom_interface_name, phantom_interface_type) |
Get interface id by device name, interface name, interface type. More... | |
def | netbrain.sysapi.datamodel.GetPhantomInterfaceIds (device, device_interface_name, phantom_interface_type) |
Get phantom interface id by device name, interface name, interface type. More... | |
def | netbrain.sysapi.datamodel.GetInterfaceIdsByType (intf_type) |
Get interface id list by interface type. More... | |
def | netbrain.sysapi.datamodel.SetInterfaceProperty (property_name, device, intf_name, intf_type, value) |
Set interface attribute. More... | |
def | netbrain.sysapi.datamodel.SetInterfacePropertyById (property_name, intf_id, intf_type, value) |
Set interface attribute by Id. More... | |
def | netbrain.sysapi.datamodel.GetInterfaceProperty (property_name, device, intf_name, intf_type) |
Get interface attribute. More... | |
def | netbrain.sysapi.datamodel.AddPhantomInterface (device_name, interface_name, interface_type, belongs_to_topology_type) |
Add phantom interface. More... | |
def | netbrain.sysapi.datamodel.RemovePhantomInterface (device_name, interface_name, interface_type) |
Remove phantom interface. More... | |
def | netbrain.sysapi.datamodel.UpdateOnePhantomInterface (device_name, interface_type, interface_object) |
Update one interface of one device. More... | |
def | netbrain.sysapi.datamodel.UpdatePhantomInterfaces (device_name, interface_type, interface_objects) |
Update all interface of one device. More... | |
def | netbrain.sysapi.datamodel.ClearPhantomInterface (device_name, interface_type) |
delete all the intf of the device More... | |
def | netbrain.sysapi.datamodel.GetInterfaceShortName (device_name, interface_name) |
get interface short name More... | |
def | netbrain.sysapi.datamodel.CompleteInterfaceName (device_name, interface_name) |
get interface full name More... | |
def | netbrain.sysapi.datamodel.SetModuleObject (device_name, module_name, module_object) |
update device's module object by module name. More... | |
def | netbrain.sysapi.datamodel.GetModuleObject (device_name, module_name) |
get device's module object by module name. More... | |
def | netbrain.sysapi.datamodel.SetModuleProperty (property_name, device_name, module_name, value) |
Set module attribute. More... | |
def | netbrain.sysapi.datamodel.GetModuleProperty (property_name, device_name, module_name) |
Get module attribute. More... | |
def | netbrain.sysapi.datamodel.GetMemberInterfaceIdsBelong2Channel (device, intf) |
get member interface ids Belong2Channel More... | |
def | netbrain.sysapi.datamodel.SetInternetCloud (cloud_name, value) |
set internet cloud object. More... | |
def | netbrain.sysapi.datamodel.GetInternetCloud (cloud_name) |
get internet cloud. More... | |
def | netbrain.sysapi.datamodel.SetInternetCloudProperty (property_name, cloud_name, value) |
set internet cloud property. More... | |
def | netbrain.sysapi.datamodel.GetInternetCloudProperty (property_name, cloud_name) |
get internet cloud property. More... | |
def | netbrain.sysapi.datamodel.SetInternetCloudIntfList (cloudName, boudaryInterfaceList) |
set internet cloud interface list. More... | |
def | netbrain.sysapi.datamodel.RemoveInternetCloudInterface (cloudName, interfaceName) |
Remove internet cloud interface,from v2.1 (2019-03-04) More... | |
def | netbrain.sysapi.datamodel.ClearInternetCloudIntfList (cloudName) |
delete all the intf of the internet cloud ,from v2.1 (2019-03-04) More... | |
def | netbrain.sysapi.datamodel.GetInternetCloudIntfList (cloudName) |
get internet cloud interface list. More... | |
def | netbrain.sysapi.datamodel.SetMPLSCloudProperty (propertyName, cloudName, value) |
set mpls cloud property. More... | |
def | netbrain.sysapi.datamodel.GetMPLSCloudProperty (propertyName, cloudName) |
get mpls cloud property. More... | |
def | netbrain.sysapi.datamodel.SetMPLSCloud (cloudName, CEList, dynamicCondition, excludeCEList) |
def | netbrain.sysapi.datamodel.GetMPLSCloud (cloudName) |
def | netbrain.sysapi.datamodel.SetMPLSCloudCEObjects (cloudName, ceNbrObjs, flag) |
def | netbrain.sysapi.datamodel.SetMPLSCloudStaticCE (cloudName, iPofPEinterface, cEDevice, cEInterface, VRF, routingProtocol, VPN) |
def | netbrain.sysapi.datamodel.GetMPLSCloudStaticCEList (cloudName, ceName=None, ceIntfName=None) |
def | netbrain.sysapi.datamodel.SetMPLSCloudDynamicFilter (cloudName, filterCondition) |
set the dynamic CE filter. More... | |
def | netbrain.sysapi.datamodel.GetMPLSCloudDynamicCEList (cloudName, ceName=None, ceIntfName=None) |
def | netbrain.sysapi.datamodel.SetMPLSCloudExcludeCEList (cloudName, CEList) |
def | netbrain.sysapi.datamodel.GetMPLSCloudExcludeCEList (cloudName, ceName=None, ceIntfName=None) |
def | netbrain.sysapi.datamodel.DeleteMPLSCloud (cloudName) |
def | netbrain.sysapi.datamodel.GetMacDevicesByMac (mac) |
get mac device by mac More... | |
def | netbrain.sysapi.datamodel.DeleteMacDeviceByMac (mac) |
delete mac device by mac More... | |
def | netbrain.sysapi.datamodel.DeleteMacDeviceById (id) |
delete mac device by id More... | |
api for device & interface
def netbrain.sysapi.datamodel.AddDeviceObject | ( | deviceObj | ) |
Add device object.
deviceObj | device object |
def netbrain.sysapi.datamodel.AddPhantomInterface | ( | device_name, | |
interface_name, | |||
interface_type, | |||
belongs_to_topology_type | |||
) |
Add phantom interface.
device_name | (string) device name |
interface_name | (string) interface name |
interface_type | (string) interface type |
belongs_to_topology_type | (string) belongs to topo type |
def netbrain.sysapi.datamodel.ClearInternetCloudIntfList | ( | cloudName | ) |
delete all the intf of the internet cloud ,from v2.1 (2019-03-04)
cloudName | (string) internet cloud name |
def netbrain.sysapi.datamodel.ClearPhantomInterface | ( | device_name, | |
interface_type | |||
) |
delete all the intf of the device
device_name | (string) device name |
interface_type | (string) interface type |
def netbrain.sysapi.datamodel.CompleteInterfaceName | ( | device_name, | |
interface_name | |||
) |
get interface full name
device_name | (string) device name |
interface_name | (string) interface name |
def netbrain.sysapi.datamodel.DeleteMacDeviceById | ( | id | ) |
delete mac device by id
id | (string) id |
def netbrain.sysapi.datamodel.DeleteMacDeviceByMac | ( | mac | ) |
delete mac device by mac
mac | mac |
def netbrain.sysapi.datamodel.DeleteMPLSCloud | ( | cloudName | ) |
def netbrain.sysapi.datamodel.GetDeviceInterfaceId | ( | device, | |
phantom_interface_name, | |||
phantom_interface_type | |||
) |
Get interface id by device name, interface name, interface type.
device | (string) device name |
phantom_interface_name | (string) phantom_interface_name |
phantom_interface_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
def netbrain.sysapi.datamodel.GetDeviceNameFromIp | ( | strIp | ) |
Get device name by IP(interface ips.ip)
strIp | interface ip |
def netbrain.sysapi.datamodel.GetDeviceObject | ( | device | ) |
Get device object by device name.
device | device name |
def netbrain.sysapi.datamodel.GetDeviceObjectById | ( | devId | ) |
Get device object by device id.
devId | device identify |
def netbrain.sysapi.datamodel.GetDeviceProperty | ( | property_name, | |
device_name | |||
) |
Get device property.
property_name | (string) property name |
device_name | (string) device name |
def netbrain.sysapi.datamodel.GetInterfaceIdsByDeviceName | ( | device, | |
intf_type | |||
) |
Get interface id list by device name.
device | (string) device name |
intf_type | (string) interface type - "" intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
[{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
def netbrain.sysapi.datamodel.GetInterfaceIdsByType | ( | intf_type | ) |
Get interface id list by interface type.
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
[{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
def netbrain.sysapi.datamodel.GetInterfaceObject | ( | device, | |
intf_name, | |||
intf_type | |||
) |
Get interface object by device name, interface name.
device | (string) device name |
intf_name | (string) interface name |
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
def netbrain.sysapi.datamodel.GetInterfaceObjectById | ( | intf_id, | |
intf_type | |||
) |
Get interface object by interface id.
intf_id | (string) interface id |
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
def netbrain.sysapi.datamodel.GetInterfaceProperty | ( | property_name, | |
device, | |||
intf_name, | |||
intf_type | |||
) |
Get interface attribute.
property_name | (string) property name |
intf_type | (string) interface type |
device | (string) device name |
intf_name | (string) interface name |
def netbrain.sysapi.datamodel.GetInterfaceShortName | ( | device_name, | |
interface_name | |||
) |
get interface short name
device_name | (string) device name |
interface_name | (string) interface name |
def netbrain.sysapi.datamodel.GetInternetCloud | ( | cloud_name | ) |
get internet cloud.
from v2.0 (2019-02-14)
cloud_name | (string) internet cloud name |
def netbrain.sysapi.datamodel.GetInternetCloudIntfList | ( | cloudName | ) |
get internet cloud interface list.
from v2.0 (2019-02-14)
cloudName | (string) internet cloud name |
def netbrain.sysapi.datamodel.GetInternetCloudProperty | ( | property_name, | |
cloud_name | |||
) |
get internet cloud property.
from v2.0 (2019-02-14)
property_name | (string) property name |
cloud_name | (string) internet cloud name |
def netbrain.sysapi.datamodel.GetMacDevicesByMac | ( | mac | ) |
get mac device by mac
mac | mac |
def netbrain.sysapi.datamodel.GetMemberInterfaceIdsBelong2Channel | ( | device, | |
intf | |||
) |
get member interface ids Belong2Channel
device | (string) device name |
intf | (string) interface name |
[id1,id2,...] |
def netbrain.sysapi.datamodel.GetModuleObject | ( | device_name, | |
module_name | |||
) |
get device's module object by module name.
device_name | (string) device name |
module_name | (string) module name |
def netbrain.sysapi.datamodel.GetModuleProperty | ( | property_name, | |
device_name, | |||
module_name | |||
) |
Get module attribute.
property_name | (string) property name |
device_name | (string) device name |
module_name | (string) module name |
def netbrain.sysapi.datamodel.GetMPLSCloud | ( | cloudName | ) |
def netbrain.sysapi.datamodel.GetMPLSCloudDynamicCEList | ( | cloudName, | |
ceName = None , |
|||
ceIntfName = None |
|||
) |
def netbrain.sysapi.datamodel.GetMPLSCloudExcludeCEList | ( | cloudName, | |
ceName = None , |
|||
ceIntfName = None |
|||
) |
def netbrain.sysapi.datamodel.GetMPLSCloudProperty | ( | propertyName, | |
cloudName | |||
) |
get mpls cloud property.
from v2.0 (2019-02-14)
propertyName | (string) property name |
cloudName | (string) internet cloud name |
def netbrain.sysapi.datamodel.GetMPLSCloudStaticCEList | ( | cloudName, | |
ceName = None , |
|||
ceIntfName = None |
|||
) |
def netbrain.sysapi.datamodel.GetPhantomInterfaceIds | ( | device, | |
device_interface_name, | |||
phantom_interface_type | |||
) |
Get phantom interface id by device name, interface name, interface type.
device | (string) device name |
device_interface_name | (string) device_interface_name |
phantom_interface_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
[{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
def netbrain.sysapi.datamodel.QueryDeviceIds | ( | query | ) |
query device id list by query
query | condition |
def netbrain.sysapi.datamodel.QueryDeviceObjects | ( | query | ) |
query device object
query | query condition |
def netbrain.sysapi.datamodel.QueryInterfaceIds | ( | query, | |
intf_type | |||
) |
Get interface id list by intf type.
query | (dic) query condition |
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
[{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
def netbrain.sysapi.datamodel.QueryInterfaceObjects | ( | query, | |
intf_type | |||
) |
Get interface id list by intf type.
query | (dic) query condition |
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
[{Intf | object 1},{Intf object 2}, .....] |
def netbrain.sysapi.datamodel.RemoveInternetCloudInterface | ( | cloudName, | |
interfaceName | |||
) |
Remove internet cloud interface,from v2.1 (2019-03-04)
cloudName | (string) internet cloud name |
interfaceName | (string) interface name |
def netbrain.sysapi.datamodel.RemovePhantomInterface | ( | device_name, | |
interface_name, | |||
interface_type | |||
) |
Remove phantom interface.
device_name | (string) device name |
interface_name | (string) interface name |
interface_type | (string) interface type |
def netbrain.sysapi.datamodel.SetDeviceObject | ( | device, | |
deviceObj | |||
) |
set device object
device | |
deviceObj | Full device object |
def netbrain.sysapi.datamodel.SetDeviceProperty | ( | property_name, | |
device_name, | |||
value | |||
) |
Set device property.
property_name | (string) property name |
device_name | (string) device name |
value |
def netbrain.sysapi.datamodel.SetInterfaceObject | ( | device, | |
intf_name, | |||
intf_type, | |||
intf_object | |||
) |
Set interface object.
device | (string) device name |
intf_name | (string) interface name |
intf_type | (string) interface type - intfs, ipIntfs, ip6Intfs, greVpnIntfs, ipsecVpnIntfs, |
intf_object | (dic) interface object |
def netbrain.sysapi.datamodel.SetInterfaceProperty | ( | property_name, | |
device, | |||
intf_name, | |||
intf_type, | |||
value | |||
) |
Set interface attribute.
property_name | (string) property name |
intf_type | (string) interface type |
device | (string) device name |
intf_name | (string) interface name |
value |
def netbrain.sysapi.datamodel.SetInterfacePropertyById | ( | property_name, | |
intf_id, | |||
intf_type, | |||
value | |||
) |
Set interface attribute by Id.
property_name | (string) property name |
intf_type | (string) interface type |
intf_id | (string) interface id |
value |
def netbrain.sysapi.datamodel.SetInternetCloud | ( | cloud_name, | |
value | |||
) |
set internet cloud object.
from v2.0 (2019-02-14)
cloud_name | (string) internet cloud name |
value | internet cloud object,ex. |
def netbrain.sysapi.datamodel.SetInternetCloudIntfList | ( | cloudName, | |
boudaryInterfaceList | |||
) |
set internet cloud interface list.
from v2.0 (2019-02-14) if the interface name exsist,update the interface,else add new interface.
cloudName | (string) internet cloud name |
boudaryInterfaceList | (list of object) cloud boudary interfaces. |
def netbrain.sysapi.datamodel.SetInternetCloudProperty | ( | property_name, | |
cloud_name, | |||
value | |||
) |
set internet cloud property.
from v2.0 (2019-02-14)
property_name | (string) property name |
cloud_name | (string) internet cloud name |
value |
def netbrain.sysapi.datamodel.SetModuleObject | ( | device_name, | |
module_name, | |||
module_object | |||
) |
update device's module object by module name.
device_name | (string) device name |
module_name | (string) module name |
module_object | (dic) module object |
def netbrain.sysapi.datamodel.SetModuleProperty | ( | property_name, | |
device_name, | |||
module_name, | |||
value | |||
) |
Set module attribute.
property_name | (string) property name |
device_name | (string) device name |
module_name | (string) module name |
value |
def netbrain.sysapi.datamodel.SetMPLSCloud | ( | cloudName, | |
CEList, | |||
dynamicCondition, | |||
excludeCEList | |||
) |
def netbrain.sysapi.datamodel.SetMPLSCloudCEObjects | ( | cloudName, | |
ceNbrObjs, | |||
flag | |||
) |
def netbrain.sysapi.datamodel.SetMPLSCloudDynamicFilter | ( | cloudName, | |
filterCondition | |||
) |
set the dynamic CE filter.
from v2.0 (2019-02-14)
cloudName | (string) mpls cloud name |
filterCondition | (object) dynamic CE filter object |
def netbrain.sysapi.datamodel.SetMPLSCloudExcludeCEList | ( | cloudName, | |
CEList | |||
) |
def netbrain.sysapi.datamodel.SetMPLSCloudProperty | ( | propertyName, | |
cloudName, | |||
value | |||
) |
set mpls cloud property.
from v2.0 (2019-02-14)
propertyName | (string) property name |
cloudName | (string) mpls cloud name |
value |
def netbrain.sysapi.datamodel.SetMPLSCloudStaticCE | ( | cloudName, | |
iPofPEinterface, | |||
cEDevice, | |||
cEInterface, | |||
VRF, | |||
routingProtocol, | |||
VPN | |||
) |
def netbrain.sysapi.datamodel.UpdateOnePhantomInterface | ( | device_name, | |
interface_type, | |||
interface_object | |||
) |
Update one interface of one device.
device_name | (string) device name |
interface_type | (string) interface type |
interface_object | (dic) interface value. ex:{Interface object1} |
def netbrain.sysapi.datamodel.UpdatePhantomInterfaces | ( | device_name, | |
interface_type, | |||
interface_objects | |||
) |
Update all interface of one device.
device_name | (string) device name |
interface_type | (string) interface type |
interface_objects | (list) interfaces value. ex:[{Interface object1}, {Interface object2}, ....] |