|
Python Api
IE10.1
|
Functions | |
| def | GetNeighborIdsOfDevice (device, topo_type, use_new_table=False) |
| Get nbr id list. More... | |
| def | GetNeighborLinksOfDevice (device, topo_type, use_new_table=False) |
| Get nbr id list. More... | |
| def | GetOriginalLinksOfDevice (device, topo_type, use_new_table=False) |
| Get original topo datas of device. More... | |
| def | GetOriginalLinksOfInterface (device, intf_name, topo_type, use_new_table=False) |
| Get original topo datas of device interface. More... | |
| def | GetOriginalLinksOfMedia (media_name, topo_type, use_new_table=False, zone_name="Default Zone") |
| Get original topo datas of media. More... | |
| def | GetNeighborInterfaceIdsOfDevice (device, topo_type, use_new_table=False) |
| Get nbr interface id list by device. More... | |
| def | GetNeighborIdsOfInterface (device, intf_name, intf_type, topo_type, use_new_table=False, get_new_intf=False) |
| Get nbr device id list by interface. More... | |
| def | GetNeighborInterfaceIdsOfInterface (device, intf_name, intf_type, topo_type, use_new_table=False, get_new_intf=False) |
| Get nbr interface id list by interface. More... | |
| def | GetTopoTypeStatusObject (topo_type) |
| Get topo link status by id. More... | |
| def | SetTopoTypeStatusObject (object) |
| Set topo link status object. More... | |
| def | SetTopologyStartTime (topo_type) |
| set topo start time More... | |
| def | SetTopologyEndTime (topo_type) |
| set topo end time More... | |
| def | UpdateTopologyProgress (topo_type, progress_value) |
| update topo progress More... | |
| def | RemoveLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| remove link p2p by name More... | |
| def | RemoveLinkMp (device, intf, intf_type, media_name, media_type, topo_type) |
| remove link Mp by name More... | |
| def | AddLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| add link p2p by name More... | |
| def | AddLinkMp (device, intf, intf_type, media_name, media_type, topo_type, link_type_group="", zone="") |
| add link Mp by name More... | |
| def | DeleteTopoLinksByIds (idList, topo_type, tech) |
| delete topo link by Ids More... | |
| def | RemoveLinksOfInterface (device, intf, intf_type, topo_type) |
| remove all links of one interface More... | |
| def | CreateUnknownEndsystem (ip, mac, desc="") |
| create one unknown endsystem,use ip and mac More... | |
| def | RemoveLinksBetweenDevices (device_names, topo_type, source="system") |
| remove links between devices More... | |
| def | AddLockedLinkMp (device, intf, intf_type, media_name, media_type, topo_type) |
| add locked link mp More... | |
| def | AddLockedLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| add locked link p2p by name More... | |
| def | RemoveLockedLinkMp (device, intf, intf_type, media_name, media_type, topo_type) |
| remove locked link Mp by name More... | |
| def | RemoveLockedLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| remove locked link p2p by name More... | |
| def | AddBlockedLinkMp (device, intf, intf_type, media_name, media_type, topo_type) |
| add blocked link Mp More... | |
| def | AddBlockedLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| add blocked link p2p More... | |
| def | RemoveBlockedLinkMp (device, intf, intf_type, media_name, media_type, topo_type) |
| remove blocked link Mp More... | |
| def | RemoveBlockedLinkP2p (device1, intf1, intf_type1, device2, intf2, intf_type2, topo_type) |
| remove blocked link p2p by name More... | |
| def | AddZone (name, desc, zone_type=3) |
| add zone More... | |
| def | DeleteZoneByName (name) |
| delete zone name More... | |
| def | MoveInterfaceToZone (device, intf, zone_name, get_new_intf=False) |
| move interface to zone More... | |
| def | SetInterfaceToZone (device, intf, intf_type, zone_name, get_new_intf=False) |
| set interface to zone More... | |
| def | GetZoneNameOfInterface (device, intf, get_new_intf=False) |
| get zone name of interface More... | |
| def | GetMedias (media_type, topo_type) |
| Get media. More... | |
| def | GetMediaObjects (topo_type, dev_name) |
| def | GetAllZoneName () |
| get zone name list More... | |
| def | GetZoneDetailbyName (zone_name) |
| get zone detail by name More... | |
| def | GetZoneById (zone_id) |
| get basic zone by id More... | |
| def | AddMedia (media_name, media_type, topo_type, zone='', kw) |
| add media More... | |
| def | DeleteMedia (media_name) |
| delete media More... | |
| def | GetMediaById (media_id) |
| get media by id More... | |
| def | GetInterfaceIdsByMedia (media_name, media_type, topo_type) |
| Get interface id list by media. More... | |
| def | GetDeviceIdsByMedia (media_name, media_type, topo_type) |
| Get device id list by media. More... | |
| def | GetEndSystemGwL3Media (ip) |
| Get end system gw by l3 media. More... | |
| def | GetSameLanInterfacesByMedia (ip) |
| for any given ip, try to find interfaces connected to same media in L3 topo More... | |
| def | ClearLinks (topo_type) |
| Delete all links from topology table. More... | |
| def | UpdateSubnetIpInterfacesByDevices (device_list) |
| UpdateSubnetIpInterfacesByDevices. More... | |
| def | GetBestPortForMac (mac, use_new_table=False, get_new_intf=False) |
| Get best port for Mac. More... | |
Variables | |
| str_stack = traceback.format_exc(); | |
| def netbrain.sysapi.topology.AddBlockedLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type | |||
| ) |
add blocked link Mp
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.AddBlockedLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
add blocked link p2p
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.AddLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type, | |||
link_type_group = "", |
|||
zone = "" |
|||
| ) |
add link Mp by name
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| link_type_group | (string) link type group (from EE7.1b)
|
| zone | (string) zone of media (from EE8.03) |
| def netbrain.sysapi.topology.AddLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
add link p2p by name
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.AddLockedLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type | |||
| ) |
add locked link mp
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.AddLockedLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
add locked link p2p by name
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.AddMedia | ( | media_name, | |
| media_type, | |||
| topo_type, | |||
zone = '', |
|||
| kw | |||
| ) |
add media
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| zone | (string) zone name of media,from V8.0.3 kw (dict) media attributes
|
| def netbrain.sysapi.topology.AddZone | ( | name, | |
| desc, | |||
zone_type = 3 |
|||
| ) |
add zone
| name | (string) zone name |
| desc | (string) zone description |
| zone_type | (int) zone type - default is 3.ByQapp,it means ByApi 1.BySystem, 2.ByManually, 3.ByQapp |
| def netbrain.sysapi.topology.ClearLinks | ( | topo_type | ) |
Delete all links from topology table.
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.CreateUnknownEndsystem | ( | ip, | |
| mac, | |||
desc = "" |
|||
| ) |
create one unknown endsystem,use ip and mac
| ip | (string) ip address |
| mac | (string) mac address |
| desc | (string) description |
| def netbrain.sysapi.topology.DeleteMedia | ( | media_name | ) |
delete media
| media_name | (string) media name |
| def netbrain.sysapi.topology.DeleteTopoLinksByIds | ( | idList, | |
| topo_type, | |||
| tech | |||
| ) |
delete topo link by Ids
| idList | (List) id list |
| topo_type | (string) topo type
|
| tech | (string) tech |
| def netbrain.sysapi.topology.DeleteZoneByName | ( | name | ) |
delete zone name
| name | zone name |
| def netbrain.sysapi.topology.GetAllZoneName | ( | ) |
get zone name list
| def netbrain.sysapi.topology.GetBestPortForMac | ( | mac, | |
use_new_table = False, |
|||
get_new_intf = False |
|||
| ) |
Get best port for Mac.
| mac | (string) intergface mac address, like 0050.5685.2A9E |
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| get_new_intf | (bool) Whether to use new data(When the interface data is modified in your script, it needs to be set to true in order to obtain the updated data) |
| def netbrain.sysapi.topology.GetDeviceIdsByMedia | ( | media_name, | |
| media_type, | |||
| topo_type | |||
| ) |
Get device id list by media.
| media_name | (string) media name |
| media_type | (string) media type |
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.GetEndSystemGwL3Media | ( | ip | ) |
Get end system gw by l3 media.
| ip | ip address |
| [id1,id2,...] |
| def netbrain.sysapi.topology.GetInterfaceIdsByMedia | ( | media_name, | |
| media_type, | |||
| topo_type | |||
| ) |
Get interface id list by media.
| media_name | (string) media name |
| media_type | (string) media type |
| topo_type | (string) topo type
|
| [{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
| def netbrain.sysapi.topology.GetMediaById | ( | media_id | ) |
get media by id
| media_id | (string) media id |
| example | { "_id" : "d421c7db-9f07-4ab7-8320-80d3501808f7", "hsrp" : "", "idName" : "", "isDeleted" : false, "isHiden" : false, "lower" : 173588488, "mask" : 31, "topoType" : "L3_Topo_Type", "type" : "Lan", "uniName" : "10.88.192.8/31", "upper" : 173588489, "vrf" : "blue", "zone" : "" } |
| def netbrain.sysapi.topology.GetMediaObjects | ( | topo_type, | |
| dev_name | |||
| ) |
| def netbrain.sysapi.topology.GetMedias | ( | media_type, | |
| topo_type | |||
| ) |
Get media.
| media_type | (string) media type |
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.GetNeighborIdsOfDevice | ( | device, | |
| topo_type, | |||
use_new_table = False |
|||
| ) |
Get nbr id list.
| device | (string) device name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| def netbrain.sysapi.topology.GetNeighborIdsOfInterface | ( | device, | |
| intf_name, | |||
| intf_type, | |||
| topo_type, | |||
use_new_table = False, |
|||
get_new_intf = False |
|||
| ) |
Get nbr device id list by interface.
| device | (string) device name |
| intf_name | (string) interface name |
| intf_type | (string) interface type |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| get_new_intf | (bool) Whether to use new data(When the interface data is modified in your script, it needs to be set to true in order to obtain the updated data) |
| def netbrain.sysapi.topology.GetNeighborInterfaceIdsOfDevice | ( | device, | |
| topo_type, | |||
use_new_table = False |
|||
| ) |
Get nbr interface id list by device.
| device | (string) device name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| [{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
| def netbrain.sysapi.topology.GetNeighborInterfaceIdsOfInterface | ( | device, | |
| intf_name, | |||
| intf_type, | |||
| topo_type, | |||
use_new_table = False, |
|||
get_new_intf = False |
|||
| ) |
Get nbr interface id list by interface.
| device | (string) device name |
| intf_name | (string) interface name |
| intf_type | (string) interface type |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| get_new_intf | (bool) Whether to use new data(When the interface data is modified in your script, it needs to be set to true in order to obtain the updated data) |
| [{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
| def netbrain.sysapi.topology.GetNeighborLinksOfDevice | ( | device, | |
| topo_type, | |||
use_new_table = False |
|||
| ) |
Get nbr id list.
| device | (string) device name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| [{'localIntfId' | '222', 'nbrDevId': '333', 'nbrIntfId': '444','nbrIntfSchema': 'ipIntfs'}, {XXX}, {XXX}] |
| def netbrain.sysapi.topology.GetOriginalLinksOfDevice | ( | device, | |
| topo_type, | |||
use_new_table = False |
|||
| ) |
Get original topo datas of device.
| device | (string) device name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| def netbrain.sysapi.topology.GetOriginalLinksOfInterface | ( | device, | |
| intf_name, | |||
| topo_type, | |||
use_new_table = False |
|||
| ) |
Get original topo datas of device interface.
| device | (string) device name |
| intf_name | (string) interface name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| def netbrain.sysapi.topology.GetOriginalLinksOfMedia | ( | media_name, | |
| topo_type, | |||
use_new_table = False, |
|||
zone_name = "Default Zone" |
|||
| ) |
Get original topo datas of media.
| media_name | (string) media name |
| topo_type | (string) topo type
|
| use_new_table | (bool) if use the new table to get the datas,default is only use current table. |
| zone_name | (string) Zone Name of the Media. |
| def netbrain.sysapi.topology.GetSameLanInterfacesByMedia | ( | ip | ) |
for any given ip, try to find interfaces connected to same media in L3 topo
| ip | ip address |
| [{'id':'id1','type':'ipintf'},{'id':'id2','type':'intfs'}] |
| def netbrain.sysapi.topology.GetTopoTypeStatusObject | ( | topo_type | ) |
Get topo link status by id.
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.GetZoneById | ( | zone_id | ) |
get basic zone by id
| zone_id | zone Id |
| example | { '_id': 'c1211568-6676-49e1-a06e-a7cf914227a5', 'description': 'this is for tst', 'isCurrentUsed': True, 'isDefault': False, 'name': 'test_zone123', 'zoneType': 3 } |
| def netbrain.sysapi.topology.GetZoneDetailbyName | ( | zone_name | ) |
get zone detail by name
| zone_name | zone name |
| example | { '_id': 'c1211568-6676-49e1-a06e-a7cf914227a5', 'description': 'this is for tst', 'isCurrentUsed': True, 'isDefault': False, 'name': 'test_zone123', 'zoneType': 3 } |
| def netbrain.sysapi.topology.GetZoneNameOfInterface | ( | device, | |
| intf, | |||
get_new_intf = False |
|||
| ) |
get zone name of interface
| device | (string) device name |
| intf | (string) interface name (ip interface for example: FastEthernet1 1.2.3.4) |
| get_new_intf | (bool) Whether to use new data(When the interface data is modified in your script, it needs to be set to true in order to obtain the updated data) |
| def netbrain.sysapi.topology.MoveInterfaceToZone | ( | device, | |
| intf, | |||
| zone_name, | |||
get_new_intf = False |
|||
| ) |
move interface to zone
| device | (string) device name |
| intf | (string) interface name (ip interface for example: FastEthernet1 1.2.3.4) |
| zone_name | (string) zone name |
| get_new_intf | (bool) Whether to use new data(When the interface data is modified in your script, it needs to be set to true in order to obtain the updated data) |
| def netbrain.sysapi.topology.RemoveBlockedLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type | |||
| ) |
remove blocked link Mp
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveBlockedLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
remove blocked link p2p by name
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type | |||
| ) |
remove link Mp by name
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
remove link p2p by name
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveLinksBetweenDevices | ( | device_names, | |
| topo_type, | |||
source = "system" |
|||
| ) |
remove links between devices
| device_names | (list | tuple) device name list |
| topo_type | (string) topo type
|
| source | (string) source type - system xx xx |
| def netbrain.sysapi.topology.RemoveLinksOfInterface | ( | device, | |
| intf, | |||
| intf_type, | |||
| topo_type | |||
| ) |
remove all links of one interface
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveLockedLinkMp | ( | device, | |
| intf, | |||
| intf_type, | |||
| media_name, | |||
| media_type, | |||
| topo_type | |||
| ) |
remove locked link Mp by name
| device | (string) device name |
| intf | (string) intf name |
| intf_type | (string) intf type name
|
| media_name | (string) media name |
| media_type | (string) media type
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.RemoveLockedLinkP2p | ( | device1, | |
| intf1, | |||
| intf_type1, | |||
| device2, | |||
| intf2, | |||
| intf_type2, | |||
| topo_type | |||
| ) |
remove locked link p2p by name
| device1 | (string) device1 name |
| intf1 | (string) intf1 name |
| intf_type1 | (string) intf1 type name
|
| device2 | (string) device2 name |
| intf2 | (string) intf2 name |
| intf_type2 | (string) intf2 type name
|
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.SetInterfaceToZone | ( | device, | |
| intf, | |||
| intf_type, | |||
| zone_name, | |||
get_new_intf = False |
|||
| ) |
set interface to zone
| device | (string) device name |
| intf | (string) interface name |
| intf_type | (string) intf2 type name
|
| zone_name | (string) zone name |
| get_new_intf | (bool) is get new interface from DB? |
| def netbrain.sysapi.topology.SetTopologyEndTime | ( | topo_type | ) |
set topo end time
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.SetTopologyStartTime | ( | topo_type | ) |
set topo start time
| topo_type | (string) topo type
|
| def netbrain.sysapi.topology.SetTopoTypeStatusObject | ( | object | ) |
Set topo link status object.
| object | topo link status object |
| def netbrain.sysapi.topology.UpdateSubnetIpInterfacesByDevices | ( | device_list | ) |
UpdateSubnetIpInterfacesByDevices.
| device_list | device name List |
| def netbrain.sysapi.topology.UpdateTopologyProgress | ( | topo_type, | |
| progress_value | |||
| ) |
update topo progress
| topo_type | (string) topo type
|
| progress_value | (int) progress value |
| netbrain.sysapi.topology.str_stack = traceback.format_exc(); |
1.8.14