|
Python Api
IE10.1
|
Functions | |
| def | QueryNodeObjects (nbpath_schema, query) |
| def | QueryDeviceObjects (query) |
| query device object More... | |
| def | QueryDeviceIds (query) |
| query device id list by query More... | |
| def | GetDevIdsByNames (devNames) |
| query device id list by device name More... | |
| def | SetDeviceObject (device, deviceObj) |
| set device object More... | |
| def | AddDeviceObject (deviceObj) |
| def | GetDeviceObject (device) |
| Get device object by device name. More... | |
| def | GetDeviceObjectById (devId) |
| Get device object by device id. More... | |
| def | GetDeviceNameFromIp (strIp) |
| Get device name by IP(interface ips.ip) More... | |
| def | SetDeviceProperty (property_name, device_name, value) |
| Set device property. More... | |
| def | GetDeviceProperty (property_name, device_name) |
| Get device property. More... | |
| def | QueryInterfaceIds (query, intf_type) |
| Get interface id list by intf type. More... | |
| def | QueryInterfaceObjects (query, intf_type) |
| Get interface id list by intf type. More... | |
| def | SetInterfaceObject (device, intf_name, intf_type, intf_object, get_new=False) |
| Set interface object. More... | |
| def | GetInterfaceObject (device, intf_name, intf_type, get_new=False) |
| Get interface object by device name, interface name. More... | |
| def | GetInterfaceObjectById (intf_id, intf_type, get_new=False) |
| Get interface object by interface id. More... | |
| def | GetInterfaceIdsByDeviceName (device, intf_type) |
| Get interface id list by device name. More... | |
| def | GetDeviceInterfaceId (device, phantom_interface_name, phantom_interface_type, get_new=False) |
| Get interface id by device name, interface name, interface type. More... | |
| def | GetPhantomInterfaceIds (device, device_interface_name, phantom_interface_type) |
| Get phantom interface id by device name, interface name, interface type. More... | |
| def | GetInterfaceIdsByType (intf_type) |
| Get interface id list by interface type. More... | |
| def | SetInterfaceProperty (property_name, device, intf_name, intf_type, value, get_new=False) |
| Set interface attribute. More... | |
| def | SetInterfacePropertyById (property_name, intf_id, intf_type, value, get_new=False) |
| Set interface attribute by Id. More... | |
| def | GetInterfaceProperty (property_name, device, intf_name, intf_type) |
| Get interface attribute. More... | |
| def | AddPhantomInterface (device_name, interface_name, interface_type, belongs_to_topology_type, get_new=False) |
| Add phantom interface. More... | |
| def | RemovePhantomInterface (device_name, interface_name, interface_type) |
| Remove phantom interface. More... | |
| def | UpdateOnePhantomInterface (device_name, interface_type, interface_object, get_new=False) |
| Update one interface of one device. More... | |
| def | UpdatePhantomInterfaces (device_name, interface_type, interface_objects) |
| Update all interface of one device. More... | |
| def | ClearPhantomInterface (device_name, interface_type) |
| delete all the intf of the device More... | |
| def | GetInterfaceShortName (device_name, interface_name) |
| get interface short name More... | |
| def | CompleteInterfaceName (device_name, interface_name) |
| get interface full name More... | |
| def | SetModuleObject (device_name, module_name, module_object) |
| update device's module object by module name. More... | |
| def | GetModuleObject (device_name, module_name) |
| get device's module object by module name. More... | |
| def | SetModuleProperty (property_name, device_name, module_name, value) |
| Set module attribute. More... | |
| def | GetModuleProperty (property_name, device_name, module_name) |
| Get module attribute. More... | |
| def | GetMemberInterfaceIdsBelong2Channel (device, intf) |
| get member interface ids Belong2Channel More... | |
| def | SetInternetCloud (cloud_name, value) |
| set internet cloud object. More... | |
| def | GetInternetCloud (cloud_name) |
| get internet cloud. More... | |
| def | SetInternetCloudProperty (property_name, cloud_name, value) |
| set internet cloud property. More... | |
| def | GetInternetCloudProperty (property_name, cloud_name) |
| get internet cloud property. More... | |
| def | SetCloudStaticProperty (cloud_name, prop) |
| def | RemoveCloudStaticProperty (cloud_name, cloud_interface) |
| def | SetInternetCloudIntfList (cloudName, boudaryInterfaceList) |
| set internet cloud interface list. More... | |
| def | RemoveInternetCloudInterface (cloudName, interfaceName) |
| def | ClearInternetCloudIntfList (cloudName) |
| delete all the intf of the internet cloud ,from v2.1 (2019-03-04) More... | |
| def | GetInternetCloudIntfList (cloudName) |
| get internet cloud interface list. More... | |
| def | SetMPLSCloudProperty (propertyName, cloudName, value) |
| set mpls cloud property. More... | |
| def | GetMPLSCloudProperty (propertyName, cloudName) |
| get mpls cloud property. More... | |
| def | SetMPLSCloud (cloudName, CEList, dynamicCondition, excludeCEList) |
| set MPLS cloud datas. More... | |
| def | GetMPLSCloud (cloudName) |
| get the MPLS cloud define. More... | |
| def | SetMPLSCloudCEObjects (cloudName, ceNbrObjs, flag) |
| add or update Mpls CE . More... | |
| def | SetMPLSCloudStaticCE (cloudName, iPofPEinterface, cEDevice, cEInterface, VRF, routingProtocol, VPN) |
| def | GetMPLSCloudStaticCEList (cloudName, ceName=None, ceIntfName=None) |
| get the static CE list of MPLS cloud. More... | |
| def | SetMPLSCloudDynamicFilter (cloudName, filterCondition) |
| set the dynamic CE filter. More... | |
| def | GetMPLSCloudDynamicCEList (cloudName, ceName=None, ceIntfName=None) |
| get the dynamic CE list of MPLS cloud. More... | |
| def | SetMPLSCloudExcludeCEList (cloudName, CEList) |
| add or update Mpls Excluce CE List. More... | |
| def | GetMPLSCloudExcludeCEList (cloudName, ceName=None, ceIntfName=None) |
| def | DeleteMPLSCloud (cloudName) |
| def | GetMacDevicesByMac (mac) |
| get mac device by mac More... | |
| def | DeleteMacDeviceByMac (mac) |
| delete mac device by mac More... | |
| def | DeleteMacDeviceById (id) |
| delete mac device by id More... | |
| def | GetSchemaType (schema_name) |
| get schema type by schema name More... | |
| def | SetDeviceCredential (device_name, username, password, privilege_username, privilege_password, access_mode=0, port=0) |
| Network settings APIs - SetDeviceCredential. More... | |
| def | GetProxyServerStatus (fsId) |
| Network settings APIs - GetProxyServerStatus. More... | |
| def | SetProxyServerOfDevice (device_name, fsId) |
| Network settings APIs - SetProxyServerOfDevice. More... | |
| def | GetDeviceSetting (device) |
| Get device setting. More... | |
| def | SetDeviceSetting (device_setting_object) |
| Set device setting. More... | |
| def | GetAllPhantomInterfaceTypes () |
| get all phantom interface types More... | |
| def | FindVendorByMAC (mac) |
| find vendor by mac More... | |
| def | GetVendorModel (sysoid) |
| get vendor model More... | |
| def | GetCurrentDomainInfo () |
| get domain info More... | |
| def | GetDeviceMACInfo (filter_list) |
| get mac info More... | |
| def | GetDeviceSiteName (device) |
| get device site name More... | |
| def | GetDeviceSiteFullPath (device) |
| get device site full path More... | |
| def | GetDeviceIdsFromSite (site_path, include_child=False) |
| get device ids from site More... | |
| def | AddDevicesToSite (site_path, device_ids) |
| add devices to site More... | |
| def | RemoveDevicersFromSite (siteh_path, device_ids) |
| def | ClearDevicesInSite (siteh_path) |
| def | GetSiteProperty (property_name, site_path) |
| get site property More... | |
| def | SetSiteProperty (property_name, site_path, value) |
| set site property More... | |
| def | GetAllSitePath () |
| Get all site paths. More... | |
| def | CreateDeviceGroup (device_group_name, device_group_type) |
| create device group More... | |
| def | AddDeviceToDeviceGroup (device, device_group_name, isStatic=True, deviceGroupType=0) |
| add device to device group More... | |
| def | AddDevicesToDeviceGroup (devices, device_group_name, isStatic=True, deviceGroupType=0) |
| add devices to device group More... | |
| def | RemoveDeviceFromDeviceGroup (device, device_group_name, deviceGroupType=0) |
| remove device from device group More... | |
| def | ClearDevicesInDeviceGroup (device_group_name, deviceGroupType=0) |
| clear device from device group More... | |
| def | GetDeviceIdsFromDeviceGroup (device_group_name, type=-1) |
| get device ids from device group More... | |
| def | GetCurrentMapId () |
| get current map id More... | |
| def | GetCurrentMapPageId () |
| get current map page id More... | |
| def | GetCurrentRunbookID () |
| get current runbook id More... | |
| def | GetRunbookTemplete (runbook_templete_path) |
| get runbook templete by path More... | |
| def | GetQappInfo (qapp_path) |
| get qapp content by path More... | |
| def | GetDataViewTemplete (dvt_path) |
| get dvt by path More... | |
| def | SaveDataToDB (db, collection, value) |
| def | QueryDataFromDB (db, collection, json_value) |
| def | GetDriverIdBySysOID (sysObjectID) |
| def | GetDriverIdByVendorModel (vendor, model) |
| get driver id from vendor model More... | |
| def | AddNDTItem (devNameExp, isRegex, ipAddrRange, driverId, subType) |
| add Network Definition More... | |
| def | GetNDTItems () |
| return all NDT Items More... | |
| def | SetNDTItem (ndtItem) |
| set NDT Item More... | |
| def | AddDonotScanSubnet (subnet, desc=None) |
| AddDonotScanSubnet. More... | |
| def | AddDonotScanDeviceSubType (subtype, desc=None) |
| AddDonotScanDeviceSubType. More... | |
| def | GetDonotScan () |
| GetDonotScan. More... | |
| def | GetUnknowSNMPSysObjectId (rtnFileds=None) |
| GetUnknowSNMPSysObjectId. More... | |
| def | GetUnclassifiedNetworkDevice (rtnFileds=None) |
| GetUnclassifiedNetworkDevice. More... | |
| def | GetSNMPDevices (rtnFileds=None, device_name_list=None) |
| GetSNMPDevices. More... | |
| def | GetMissDevice (rtnFileds=None, device_name_list=None) |
| GetMissDevice. More... | |
| def | DelMissDevice (name) |
| Delete Missdevice in current domain. More... | |
| def | get_unknown_ips () |
| def | GetDiscoverInput (datasourceId, isTaskId=None) |
| GetDiscoverInput. More... | |
| def | GetNewDevice (rtnFileds=None) |
| GetNewDevice. More... | |
| def | GetBenchmarkIdByName (sourceName) |
| GetBenchmarkIdByName. More... | |
| def | GetBenchmarkExcludeDeviceGroup (sourceId) |
| GetBenchmarkExcludeDeviceGroup. More... | |
| def | SetBenchmarkExcludeDeviceGroup (sourceId, devicegroups) |
| SetBenchmarkExcludeDeviceGroup. More... | |
| def | DisableBenchmarkOneProcess (sourceId, processName) |
| DisableBenchmarkOneProcess. More... | |
| def | GetAllDeviceLiveCostInBMTask (sourceId) |
| GetAllDeviceLiveCostInBMTask. More... | |
| def | GetBenchmarkTargetDevices (sourceId) |
| Get Benchmark target devices. More... | |
| def | GetBenchmarkAPIServerIDList (sourceId) |
| Get SDN Api Server id of Benchmark task. More... | |
| def | GetSDNNodesByServerID (serverId) |
| Get Benchmark SDN scope ranges. More... | |
| def | ValidateDictElement (key, dictIns, valueType) |
| def | ValidateEmailJson (emailInfo) |
| def | SendEmail (emailInfo) |
| Plugin prepare information for email More... | |
| def | DeleteDevices (device_names) |
| delete devices More... | |
| def | GetAllDuplicateIp () |
More... | |
| def | SetPyLastError (error, error_number=-1) |
| SetLastError. More... | |
| def | GetPyLastError () |
| def | GetPyLastErrorCode () |
| def | ClearPyLastError () |
| def | SubmitChildTask (task_name, task_param, wait_seconds=0) |
| submit one child task to RMAgent More... | |
| def | SubmitHostNameChangeChildTask () |
| def | GetHostnameChangeList (jobId) |
| get host name change list More... | |
| def | UpsertHostnameChangeList (host_name_list) |
| update host name change list More... | |
| def | KeepLastChangeDevice (snInfoList) |
| keep last change device More... | |
| def | ExcuteSharedTuneDevice (condition, option) |
| Excute Shared Tune Device. More... | |
| def | ExcuteTuneOneDevice (devId) |
| Excute Shared Tune one Device. More... | |
| def | ExcutePrivateTuneDevices (condition) |
| Excute Private Tune Devices. More... | |
| def | ExcutePrivateTuneOneDevice (devId) |
| Excute Private Tune one Device. More... | |
| def | GetTuneDeviceResultByDevIds (devIds) |
| Get Shared Tune Device Reuslt by device ids. More... | |
| def | GetPrivateTuneDeviceResultByDevIds (devIds) |
| Get Pravite Tune Device Reuslt by device ids. More... | |
| def | GetProfileClass (device) |
| def | GetTuneDeviceResultByDevId (devId) |
| Get Shared Tune Device Reuslt by device id. More... | |
| def | TriggerEventTemplate (message, eventTemplateName=None) |
| trigger event templete More... | |
| def | AddOrUpdateCommandTemplate (name, command, scope, description, type=0) |
| Add or Update command template. More... | |
| def | UpdateLayoutTagForDevs (devNames, tagNames) |
| Update LayoutTag For Devices. More... | |
| def | DeleteLayoutTagForDevs (devNames, tagNames) |
| Delete LayoutTag For Devices. More... | |
| def | DeleteOpenTopoInterfaces (intfIds) |
| Delete documents from OpenTopoInterface Collections. More... | |
| def | RecreateDeviceOpenTopoDETable (devId) |
| Rebuild OpenTopoArpTable, OpenTopoMacTable, OpenTopoNdpTable and OpenTopoL3NeighborTable by DataEngine data. More... | |
| def | GetDevicesLearnedSpecifiedMac (mac) |
| Get Devices which had Learned Specified Mac. More... | |
| def | CleanOpenTopoNeighborPairTable (query) |
| Clean OpenTopoNeighborPairTable by query condition. More... | |
Variables | |
| str_stack = traceback.format_exc() | |
| string | MPLS_DYNYMIC_FILTER_KEY = 'deviceFilter' |
| string | MPLS_CE_ACCESS_PNT_KEY = 'mpls_accessPnt' |
| string | MPLS_EXCLUDE_PNT_KEY = 'exclude_accessPnt' |
| int | CLOUD_STATIC_TYPE = 0 |
| def netbrain.sysapi.datamodel.AddDeviceObject | ( | deviceObj | ) |
| def netbrain.sysapi.datamodel.AddDevicesToDeviceGroup | ( | devices, | |
| device_group_name, | |||
isStatic = True, |
|||
deviceGroupType = 0 |
|||
| ) |
add devices to device group
| devices | (list) devices name |
| device_group_name | (string) device group name |
| isStatic | (bool) is isStatic |
| deviceGroupType | (int) device group type (default 0)- Public = 0, Private = 1 |
| def netbrain.sysapi.datamodel.AddDevicesToSite | ( | site_path, | |
| device_ids | |||
| ) |
add devices to site
| site_path | (string) site full path |
| device_ids | (list) device id lists |
| def netbrain.sysapi.datamodel.AddDeviceToDeviceGroup | ( | device, | |
| device_group_name, | |||
isStatic = True, |
|||
deviceGroupType = 0 |
|||
| ) |
add device to device group
| device | (string) device name |
| device_group_name | (string) device group name |
| isStatic | (bool) is isStatic |
| deviceGroupType | (int) device group type (default 0)- Public = 0, Private = 1 |
| def netbrain.sysapi.datamodel.AddDonotScanDeviceSubType | ( | subtype, | |
desc = None |
|||
| ) |
AddDonotScanDeviceSubType.
| subtype | (int) devicetype id |
| desc | (string) description of the subtype |
| def netbrain.sysapi.datamodel.AddDonotScanSubnet | ( | subnet, | |
desc = None |
|||
| ) |
AddDonotScanSubnet.
| subnet | (string) format:ip/mask like 10.10.0.50/24 |
| desc | (string) description of the subnet |
| def netbrain.sysapi.datamodel.AddNDTItem | ( | devNameExp, | |
| isRegex, | |||
| ipAddrRange, | |||
| driverId, | |||
| subType | |||
| ) |
add Network Definition
| devNameExp | device name expression |
| isRegex | devNameExp is regex or not. |
| ipAddrRange | ip |
| driverId | driver id |
| subType | device sub type |
| def netbrain.sysapi.datamodel.AddOrUpdateCommandTemplate | ( | name, | |
| command, | |||
| scope, | |||
| description, | |||
type = 0 |
|||
| ) |
Add or Update command template.
| name | command template name |
| command | command |
| scope | scope command scope - 0 - Public 2 - Pravite |
| description | description |
| type | command type - 0 - ConfigTemplate |
| description | description |
| def netbrain.sysapi.datamodel.AddPhantomInterface | ( | device_name, | |
| interface_name, | |||
| interface_type, | |||
| belongs_to_topology_type, | |||
get_new = False |
|||
| ) |
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 |
| get_new | (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.datamodel.CleanOpenTopoNeighborPairTable | ( | query | ) |
Clean OpenTopoNeighborPairTable by query condition.
| query | query condition |
| def netbrain.sysapi.datamodel.ClearDevicesInDeviceGroup | ( | device_group_name, | |
deviceGroupType = 0 |
|||
| ) |
clear device from device group
| device_group_name | (string) device group name |
| deviceGroupType | (int) device group type (default 0)- Public = 0, Private = 1 |
| def netbrain.sysapi.datamodel.ClearDevicesInSite | ( | siteh_path | ) |
| 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 not supported after IEv8.02 |
| 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.ClearPyLastError | ( | ) |
| 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.CreateDeviceGroup | ( | device_group_name, | |
| device_group_type | |||
| ) |
create device group
| device_group_name | (string) device group name |
| device_group_type | (int) device group type - Public = 0, Private = 1 |
| def netbrain.sysapi.datamodel.DeleteDevices | ( | device_names | ) |
delete devices
| device_names | (list) device name |
| def netbrain.sysapi.datamodel.DeleteLayoutTagForDevs | ( | devNames, | |
| tagNames | |||
| ) |
Delete LayoutTag For Devices.
| devNames | device name list |
| tagNames | tag name list |
| 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.DeleteOpenTopoInterfaces | ( | intfIds | ) |
Delete documents from OpenTopoInterface Collections.
| intfIds | interface id list |
| def netbrain.sysapi.datamodel.DelMissDevice | ( | name | ) |
Delete Missdevice in current domain.
| name(string) | name of missdevice |
| def netbrain.sysapi.datamodel.DisableBenchmarkOneProcess | ( | sourceId, | |
| processName | |||
| ) |
DisableBenchmarkOneProcess.
| sourceId | string benchmark id |
| processName | string processName must be one of these:- IPv4 L3 Topology/IPv6 L3 Topology/L2 Topology/L3 VPN Tunnel/Logical Topology/L2 Overlay Topology/ Recalculate Dynamic Device Groups/Recalculate MPLS Virtual Route Tables/ Build Default Device Data View/ Visual Space Templates\Built-in Visual Space Templates\ACI Application/ Visual Space Templates\Built-in Visual Space Templates\ACI Overlay/ Visual Space Templates\Built-in Visual Space Templates\ESXi Host to Network/ Visual Space Templates\Built-in Visual Space Templates\ESXi Physical and Virtual Relationship/ Visual Space Templates\Built-in Visual Space Templates\NSX Relationship of Components Visual Space/ Visual Space Templates\Built-in Visual Space Templates\NSX Transport Zone View Network Visual Space/ Schedule Update Map |
| def netbrain.sysapi.datamodel.ExcutePrivateTuneDevices | ( | condition | ) |
Excute Private Tune Devices.
| condition | tune parameter |
| def netbrain.sysapi.datamodel.ExcutePrivateTuneOneDevice | ( | devId | ) |
Excute Private Tune one Device.
| devId | device id |
| def netbrain.sysapi.datamodel.ExcuteSharedTuneDevice | ( | condition, | |
| option | |||
| ) |
Excute Shared Tune Device.
| condition | tune parameter |
| option | tune option |
| def netbrain.sysapi.datamodel.ExcuteTuneOneDevice | ( | devId | ) |
Excute Shared Tune one Device.
| devId | device id |
| def netbrain.sysapi.datamodel.FindVendorByMAC | ( | mac | ) |
find vendor by mac
| mac | (string) mac |
| def netbrain.sysapi.datamodel.get_unknown_ips | ( | ) |
| def netbrain.sysapi.datamodel.GetAllDeviceLiveCostInBMTask | ( | sourceId | ) |
GetAllDeviceLiveCostInBMTask.
| sourceId | string benchmark id |
| def netbrain.sysapi.datamodel.GetAllDuplicateIp | ( | ) |
| def netbrain.sysapi.datamodel.GetAllPhantomInterfaceTypes | ( | ) |
get all phantom interface types
| ["ipIntfs",ip6Intfs,greVpnIntfs,"ipsecVpnIntfs"] |
| def netbrain.sysapi.datamodel.GetAllSitePath | ( | ) |
Get all site paths.
| def netbrain.sysapi.datamodel.GetBenchmarkAPIServerIDList | ( | sourceId | ) |
Get SDN Api Server id of Benchmark task.
| sourceId | (string) benchmark id |
| def netbrain.sysapi.datamodel.GetBenchmarkExcludeDeviceGroup | ( | sourceId | ) |
GetBenchmarkExcludeDeviceGroup.
| sourceId | string benchmark id |
| def netbrain.sysapi.datamodel.GetBenchmarkIdByName | ( | sourceName | ) |
GetBenchmarkIdByName.
| sourceName | string benchmark name |
| def netbrain.sysapi.datamodel.GetBenchmarkTargetDevices | ( | sourceId | ) |
Get Benchmark target devices.
| sourceId | (string) benchmark id |
| def netbrain.sysapi.datamodel.GetCurrentDomainInfo | ( | ) |
get domain info
| def netbrain.sysapi.datamodel.GetCurrentMapId | ( | ) |
get current map id
| def netbrain.sysapi.datamodel.GetCurrentMapPageId | ( | ) |
get current map page id
| def netbrain.sysapi.datamodel.GetCurrentRunbookID | ( | ) |
get current runbook id
| def netbrain.sysapi.datamodel.GetDataViewTemplete | ( | dvt_path | ) |
get dvt by path
| dvt_path | dvt path |
| def netbrain.sysapi.datamodel.GetDeviceIdsFromDeviceGroup | ( | device_group_name, | |
type = -1 |
|||
| ) |
get device ids from device group
| device_group_name | (string) device group name |
| type | (int) device group type(default -1) |
| ["device | id1", "device id2", ...] |
| def netbrain.sysapi.datamodel.GetDeviceIdsFromSite | ( | site_path, | |
include_child = False |
|||
| ) |
get device ids from site
| site_path | (string) site full path |
| include_child | (bool) include child - default : False |
| ["device | id1", "device id2", ...] |
| def netbrain.sysapi.datamodel.GetDeviceInterfaceId | ( | device, | |
| phantom_interface_name, | |||
| phantom_interface_type, | |||
get_new = False |
|||
| ) |
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
|
| get_new | (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.datamodel.GetDeviceMACInfo | ( | filter_list | ) |
get mac info
| filter_list | (dic) - {"device1":["mac1", "mac2", ...], "device2":[], ....} |
| [["host | name", "port name", "vlan name", "address"], [...], ...] |
| 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.GetDeviceSetting | ( | device | ) |
Get device setting.
| device | name (string) |
| example | { 'ApplianceId': 'fs36', 'CliSetting': { 'AccessMethod': 1, 'LoginScript': { 'UseLoginScript': False }, 'SSHKeyId': '', 'SSHPort': 22, 'TelnetPort': 23, 'TelnetProxyId': '', 'TelnetProxyIdForSmartCLI': '' }, 'CpuExpression': '', 'DependOn': None, 'DriverId': 'b2d313fe-43e6-4d5f-9189-b3af6b71a83a', 'Extension': None, 'ExternalServers': None, 'HostName': 'xxxx', 'LiveHostName': 'xxxx', 'LiveStatus': 1, 'Locked': False, 'ManageIp': 'xx.xx.xx.xx', 'ManageIpInt': 2887256578, 'MemoryExpression': '', 'Mode': 0, 'SNMPSetting': { 'snmpPort': 161, 'snmpVersion': 2, 'v3': { 'authMode': 0, 'authPro': 0, 'contextName': '', 'encryptPro': 0 } }, 'SubType': 2, 'Version': 420, } |
| def netbrain.sysapi.datamodel.GetDeviceSiteFullPath | ( | device | ) |
get device site full path
| device | (string) device name |
| def netbrain.sysapi.datamodel.GetDeviceSiteName | ( | device | ) |
get device site name
| device | (string) device name |
| def netbrain.sysapi.datamodel.GetDevicesLearnedSpecifiedMac | ( | mac | ) |
Get Devices which had Learned Specified Mac.
| mac | (string) intergface mac address, like 0050.5685.2A9E |
| def netbrain.sysapi.datamodel.GetDevIdsByNames | ( | devNames | ) |
query device id list by device name
| query | condition |
| def netbrain.sysapi.datamodel.GetDiscoverInput | ( | datasourceId, | |
isTaskId = None |
|||
| ) |
GetDiscoverInput.
| datasourceId | string benchmarkdefineID or devicedatasourceID |
| isTaskId | bool default False, if datasourceId is benchmarkdefineID, the isTaskId must be seted False,otherwise the isTaskId must be seted True |
| def netbrain.sysapi.datamodel.GetDonotScan | ( | ) |
GetDonotScan.
| def netbrain.sysapi.datamodel.GetDriverIdBySysOID | ( | sysObjectID | ) |
| def netbrain.sysapi.datamodel.GetDriverIdByVendorModel | ( | vendor, | |
| model | |||
| ) |
get driver id from vendor model
| vendor | name of vendor, e.g. "Cisco" |
| model | name of model, e.g. "TelePresence MCU MSE 8510" |
| def netbrain.sysapi.datamodel.GetHostnameChangeList | ( | jobId | ) |
get host name change list
| jobId |
| def netbrain.sysapi.datamodel.GetInterfaceIdsByDeviceName | ( | device, | |
| intf_type | |||
| ) |
Get interface id list by device name.
| device | (string) device name |
| intf_type | (string) interface type ""
|
| [{"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
|
| [{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
| def netbrain.sysapi.datamodel.GetInterfaceObject | ( | device, | |
| intf_name, | |||
| intf_type, | |||
get_new = False |
|||
| ) |
Get interface object by device name, interface name.
| device | (string) device name |
| intf_name | (string) interface name |
| intf_type | (string) interface type
|
| get_new | (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.datamodel.GetInterfaceObjectById | ( | intf_id, | |
| intf_type, | |||
get_new = False |
|||
| ) |
Get interface object by interface id.
| intf_id | (string) interface id |
| intf_type | (string) interface type
|
| get_new | (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.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.GetMissDevice | ( | rtnFileds = None, |
|
device_name_list = None |
|||
| ) |
GetMissDevice.
| rtnFileds | dict like this: { "devType":1, "devTypeName":1, "ctime":1, "model":1, "mgmtIP":1, "name":1, "oid":1, "vendor":1 } |
| device_name_list | device name list |
| 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 | ) |
get the MPLS cloud define.
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| def netbrain.sysapi.datamodel.GetMPLSCloudDynamicCEList | ( | cloudName, | |
ceName = None, |
|||
ceIntfName = None |
|||
| ) |
get the dynamic CE list of MPLS cloud.
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| ceName | (string) ce device name,default is None,get all the dynamic CE from MPLS Cloud |
| ceIntfName | (string) ce interface name,default is None,get all the dynamic CE interface from MPLS Cloud |
| 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 |
|||
| ) |
get the static CE list of MPLS cloud.
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| ceName | (string) ce device name,default is None,get all the static CE from MPLS Cloud |
| ceIntfName | (string) ce interface name,default is None,get all the static CE interface from MPLS Cloud |
| def netbrain.sysapi.datamodel.GetNDTItems | ( | ) |
return all NDT Items
| [{item1},{item2}...] |
| def netbrain.sysapi.datamodel.GetNewDevice | ( | rtnFileds = None | ) |
GetNewDevice.
| rtnFileds | dict like this: { "devType":1, "devTypeName":1, "ctime":1, "model":1, "mgmtIP":1, "name":1, "oid":1, "vendor":1 } |
| 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
|
| [{"interface | id":"111", "interface type":""}, {XXX}, {XXX} ] |
| def netbrain.sysapi.datamodel.GetPrivateTuneDeviceResultByDevIds | ( | devIds | ) |
Get Pravite Tune Device Reuslt by device ids.
| devIds | device id list |
| def netbrain.sysapi.datamodel.GetProfileClass | ( | device | ) |
| def netbrain.sysapi.datamodel.GetProxyServerStatus | ( | fsId | ) |
Network settings APIs - GetProxyServerStatus.
| fsId | fsId |
| def netbrain.sysapi.datamodel.GetPyLastError | ( | ) |
| def netbrain.sysapi.datamodel.GetPyLastErrorCode | ( | ) |
| def netbrain.sysapi.datamodel.GetQappInfo | ( | qapp_path | ) |
get qapp content by path
| qapp_path | qapp path |
| def netbrain.sysapi.datamodel.GetRunbookTemplete | ( | runbook_templete_path | ) |
get runbook templete by path
| runbook_templete_path | runbook templete path |
| def netbrain.sysapi.datamodel.GetSchemaType | ( | schema_name | ) |
get schema type by schema name
| schema_name | (string) schema name |
| def netbrain.sysapi.datamodel.GetSDNNodesByServerID | ( | serverId | ) |
Get Benchmark SDN scope ranges.
| serverId | (string) api server id,you can got it by call GetBenchmarkAPIServerIDList |
| def netbrain.sysapi.datamodel.GetSiteProperty | ( | property_name, | |
| site_path | |||
| ) |
get site property
| site_path | (string) site path |
| property_name | (string) property name |
| def netbrain.sysapi.datamodel.GetSNMPDevices | ( | rtnFileds = None, |
|
device_name_list = None |
|||
| ) |
GetSNMPDevices.
| rtnFileds | dict like this: { "devType":1, "devTypeName":1, "ctime":1, "model":1, "mgmtIP":1, "name":1, "oid":1, "vendor":1 } |
| device_name_list | name list |
| def netbrain.sysapi.datamodel.GetTuneDeviceResultByDevId | ( | devId | ) |
Get Shared Tune Device Reuslt by device id.
| devId | device id |
| def netbrain.sysapi.datamodel.GetTuneDeviceResultByDevIds | ( | devIds | ) |
Get Shared Tune Device Reuslt by device ids.
| devIds | device id list |
| def netbrain.sysapi.datamodel.GetUnclassifiedNetworkDevice | ( | rtnFileds = None | ) |
GetUnclassifiedNetworkDevice.
| rtnFileds | dict like this: { "subType":1, "subTypeName":1, "lDiscoveryTime":1, "model":1, "location":1, "mgmtIP":1, "name":1, "oid":1, "vendor":1 } |
| def netbrain.sysapi.datamodel.GetUnknowSNMPSysObjectId | ( | rtnFileds = None | ) |
GetUnknowSNMPSysObjectId.
| rtnFileds | dict like this: { "devType":1, "devTypeName":1, "contact":1, "ftime":1, "ipfrom":1, "location":1, "mgmtIP":1, "name":1, "oid":1 } |
| def netbrain.sysapi.datamodel.GetVendorModel | ( | sysoid | ) |
get vendor model
| sysoid | (string) oid |
| def netbrain.sysapi.datamodel.KeepLastChangeDevice | ( | snInfoList | ) |
keep last change device
| snInfoList | (dic)host name change list |
| def netbrain.sysapi.datamodel.QueryDataFromDB | ( | db, | |
| collection, | |||
| json_value | |||
| ) |
| 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
|
| [{"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
|
| [{Intf | object 1},{Intf object 2}, .....] |
| def netbrain.sysapi.datamodel.QueryNodeObjects | ( | nbpath_schema, | |
| query | |||
| ) |
| def netbrain.sysapi.datamodel.RecreateDeviceOpenTopoDETable | ( | devId | ) |
Rebuild OpenTopoArpTable, OpenTopoMacTable, OpenTopoNdpTable and OpenTopoL3NeighborTable by DataEngine data.
| devId | device id |
| def netbrain.sysapi.datamodel.RemoveCloudStaticProperty | ( | cloud_name, | |
| cloud_interface | |||
| ) |
| def netbrain.sysapi.datamodel.RemoveDeviceFromDeviceGroup | ( | device, | |
| device_group_name, | |||
deviceGroupType = 0 |
|||
| ) |
remove device from device group
| device | (string) device name |
| device_group_name | (string) device group name |
| deviceGroupType | (int) device group type (default 0)- Public = 0, Private = 1 |
| def netbrain.sysapi.datamodel.RemoveDevicersFromSite | ( | siteh_path, | |
| device_ids | |||
| ) |
| def netbrain.sysapi.datamodel.RemoveInternetCloudInterface | ( | cloudName, | |
| interfaceName | |||
| ) |
| 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.SaveDataToDB | ( | db, | |
| collection, | |||
| value | |||
| ) |
| def netbrain.sysapi.datamodel.SendEmail | ( | emailInfo | ) |
Plugin prepare information for email
| emailInfo | dict dict like this: { "subject":"Where to go", "body":"<html><head>suggest</head><body>Hi all, Let's go to the beach.</body>", "attachments":[{"content":"\"place\",\"location\"\n\"dalian_beach\", \"dalian\"\n\"qingdao_beach\",\"qingdao\"", "contenttype":"text/csv", "filename":"place.csv"}, {"content":"test", "contenttype":"text/plain; charset=us-ascii","filename":"test.txt"}] } |
| def netbrain.sysapi.datamodel.SetBenchmarkExcludeDeviceGroup | ( | sourceId, | |
| devicegroups | |||
| ) |
SetBenchmarkExcludeDeviceGroup.
| sourceId | string benchmark id |
| devicegroups | list group name list like ["#ISIS test","#OSPF 10"] |
| def netbrain.sysapi.datamodel.SetCloudStaticProperty | ( | cloud_name, | |
| prop | |||
| ) |
| def netbrain.sysapi.datamodel.SetDeviceCredential | ( | device_name, | |
| username, | |||
| password, | |||
| privilege_username, | |||
| privilege_password, | |||
access_mode = 0, |
|||
port = 0 |
|||
| ) |
Network settings APIs - SetDeviceCredential.
| device_name | deivce name |
| username | user name |
| password | password |
| privilege_username | privilege_username |
| privilege_password | privilege_password |
| access_mode | access mode - 0, – telnet 1, – SSH 2, – SSHv2 |
| port | port port if 0 not change If not find deivce setting by device name, will return False. |
| 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.SetDeviceSetting | ( | device_setting_object | ) |
Set device setting.
| device_setting_object | device setting object |
| def netbrain.sysapi.datamodel.SetInterfaceObject | ( | device, | |
| intf_name, | |||
| intf_type, | |||
| intf_object, | |||
get_new = False |
|||
| ) |
Set interface object.
| device | (string) device name |
| intf_name | (string) interface name |
| intf_type | (string) interface type
|
| intf_object | (dic) interface object |
| get_new | (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.datamodel.SetInterfaceProperty | ( | property_name, | |
| device, | |||
| intf_name, | |||
| intf_type, | |||
| value, | |||
get_new = False |
|||
| ) |
Set interface attribute.
| property_name | (string) property name |
| intf_type | (string) interface type |
| device | (string) device name |
| intf_name | (string) interface name |
| value | |
| get_new | (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.datamodel.SetInterfacePropertyById | ( | property_name, | |
| intf_id, | |||
| intf_type, | |||
| value, | |||
get_new = False |
|||
| ) |
Set interface attribute by Id.
| property_name | (string) property name |
| intf_type | (string) interface type |
| intf_id | (string) interface id |
| value | |
| get_new | (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.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. not supported after IEv8.02
| 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 | |||
| ) |
set MPLS cloud datas.
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| CEList | (list of object) all CE list, include static CE and dynamic CE. |
| dynamicCondition | (object) dynamic CE filters. |
| excludeCEList | (list of object) exclucde CE list, devices or interfaces |
| def netbrain.sysapi.datamodel.SetMPLSCloudCEObjects | ( | cloudName, | |
| ceNbrObjs, | |||
| flag | |||
| ) |
add or update Mpls CE .
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| ceNbrObjs | (list) mpls CE object. |
| flag | (int) 0:static CE,1:dyncmic CE,2:exclude CE. ceNbrObjs example: [{ 'asNum': 65535, 'ceIfVpn': '', 'ceIntfIP': '172.24.14.4/24', 'ceIntfName': 'FastEthernet0/1', 'ceName': 'BJ-R3', 'ceVpn': '55', 'descr': 'Static', 'devId': '5ab3aa49-69bd-438e-be58-ca8bb467d944', 'flag': 0, 'groupType': 'Static', 'ifname': 'd367d36d-852d-4d6c-8455-a1ece3a5c6a8', 'ip': '172.24.14.6/24', 'mplsId': '4b8aa1e9-1ad1-7ba5-7692-89484eef26c0', 'peIp': '172.24.14.6/24', 'routingProtocol': '' }] |
| 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 | |||
| ) |
add or update Mpls Excluce CE List.
from v2.0 (2019-02-14)
| cloudName | (string) mpls cloud name |
| CEList | (list) mpls exclude CE object list. CEList example: [{ "asNum" : 65535, "ceIfVpn" : "", "ceIntfIP" : "10.10.7.254/22", "ceIntfName" : "Vlan20", "ceName" : "sw-4500-15", "ceVpn" : "3", "descr" : "", "devId" : "ebcfe2cb-0b7a-4f9a-8c79-dca3a0ce18ed", "flag" : 2, "groupType" : "Excluded", "ifname" : "dddf9a2e-a648-4c53-a625-f590ef76068c", "ip" : "10.10.7.242/22", "peIp" : "10.10.7.242/22", "routingProtocol" : "" }] |
| 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.SetNDTItem | ( | ndtItem | ) |
set NDT Item
| ndtItem | (dic) ndt item |
| If | the parameter does not contain "_id", return false |
| def netbrain.sysapi.datamodel.SetProxyServerOfDevice | ( | device_name, | |
| fsId | |||
| ) |
Network settings APIs - SetProxyServerOfDevice.
| device_name | device name |
| fsId | fsId |
| def netbrain.sysapi.datamodel.SetPyLastError | ( | error, | |
error_number = -1 |
|||
| ) |
SetLastError.
| error | set thread local error |
| error_number | error number |
| def netbrain.sysapi.datamodel.SetSiteProperty | ( | property_name, | |
| site_path, | |||
| value | |||
| ) |
set site property
| site_path | (string) site path |
| property_name | (string) property name |
| value | (string) property value |
| def netbrain.sysapi.datamodel.SubmitChildTask | ( | task_name, | |
| task_param, | |||
wait_seconds = 0 |
|||
| ) |
submit one child task to RMAgent
| task_name | (string) task name,ex.:"DeleteDevice" |
| task_param | (dict) task parameters. |
| wait_seconds | (int) seconds whitch wait the child task complete. if wait_seconds equal to zero. not wait the child task complete. |
| def netbrain.sysapi.datamodel.SubmitHostNameChangeChildTask | ( | ) |
| def netbrain.sysapi.datamodel.TriggerEventTemplate | ( | message, | |
eventTemplateName = None |
|||
| ) |
trigger event templete
| message | message |
| eventTemplateName | event driven templete name |
| def netbrain.sysapi.datamodel.UpdateLayoutTagForDevs | ( | devNames, | |
| tagNames | |||
| ) |
Update LayoutTag For Devices.
| devNames | device name list |
| tagNames | tag name list |
| def netbrain.sysapi.datamodel.UpdateOnePhantomInterface | ( | device_name, | |
| interface_type, | |||
| interface_object, | |||
get_new = False |
|||
| ) |
Update one interface of one device.
| device_name | (string) device name |
| interface_type | (string) interface type |
| interface_object | (dic) interface value. ex:{Interface object1} |
| get_new | (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.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}, ....] |
| def netbrain.sysapi.datamodel.UpsertHostnameChangeList | ( | host_name_list | ) |
update host name change list
| host_name_list | host name list. |
| def netbrain.sysapi.datamodel.ValidateDictElement | ( | key, | |
| dictIns, | |||
| valueType | |||
| ) |
| def netbrain.sysapi.datamodel.ValidateEmailJson | ( | emailInfo | ) |
| int netbrain.sysapi.datamodel.CLOUD_STATIC_TYPE = 0 |
| string netbrain.sysapi.datamodel.MPLS_CE_ACCESS_PNT_KEY = 'mpls_accessPnt' |
| string netbrain.sysapi.datamodel.MPLS_DYNYMIC_FILTER_KEY = 'deviceFilter' |
| string netbrain.sysapi.datamodel.MPLS_EXCLUDE_PNT_KEY = 'exclude_accessPnt' |
| netbrain.sysapi.datamodel.str_stack = traceback.format_exc() |
1.8.14