Skip to content
Snippets Groups Projects
Commit 0599f9e5 authored by Robert Latta's avatar Robert Latta
Browse files

added additional Navigation Properties; added RelateType

parent 0cd36c61
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,17 @@ from enum import Enum
CIRCUIT_PROPERTIES = {
'InternalPorts': 1024
}
# http://149.210.162.190:81/ImsVersions/4.19.9/html/dbc969d0-e735-132e-6281-f724c6d7da64.htm # NOQA
CONTACT_PROPERTIES = {
'SiteRelatedContacts': 8,
'CustomerRelatedContacts': 16,
'GroupRelatedContacts': 32,
'VendorRelatedContacts': 64
}
# http://149.210.162.190:81/ImsVersions/4.19.9/html/5a40472e-48ee-c120-0a36-52a85d52127c.htm # NOQA
CUSTOMER_PROPERTIES = {
'CustomerRelatedContacts': 32768
}
# http://149.210.162.190:81/ImsVersions/4.19.9/html/2d27d509-77cb-537d-3ffa-796de7e82af8.htm # noqa
NODE_PROPERTIES = {
'equipment definition': 16,
......@@ -45,6 +56,15 @@ class InventoryStatus(Enum):
READY_FOR_CEASURE = 7
class RelateType(Enum):
VENDOR = 1
CONTACT = 2
GROUP = 3
CONTRACT = 4
CUSTOMER = 5
SITE = 6
class IMSError(Exception):
pass
......@@ -125,6 +145,7 @@ class IMS(object):
if j is None:
# Sometime the API returns a 200 response but with no
# body when the token has expired e.g. on a filtered query
# This also happens when there is an error in the query :(
return True
if j and isinstance(j, dict) and \
j.get('HasErrors', False) and 'guid expired' in \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment