diff --git a/inventory_provider/__init__.py b/inventory_provider/__init__.py index adbe82909a290cab265ec936fc225d68201076c3..3da1b74381335e77540e1bc527d6db29f21ff532 100644 --- a/inventory_provider/__init__.py +++ b/inventory_provider/__init__.py @@ -43,6 +43,23 @@ def create_app(): app.config['INVENTORY_PROVIDER_CONFIG'] = inventory_provider_config + # IMS based routes + + from inventory_provider.routes import ims_lg + app.register_blueprint(ims_lg.routes, url_prefix='/ims-lg') + + # end of IMS based routes + + # OTRS routes + + from inventory_provider.routes import ims_otrs + app.register_blueprint(ims_otrs.routes, url_prefix='/otrs') + + # from inventory_provider.routes import otrs_jobs + # app.register_blueprint(otrs_jobs.routes, url_prefix='/otrs') + + # end of OTRS routes + from inventory_provider.routes import default app.register_blueprint(default.routes, url_prefix='/') diff --git a/inventory_provider/config.py b/inventory_provider/config.py index 11bec6256fb7e75f587fd88358d731f28bea3f0f..288cdc2b04ded42bcac18a9ec85293188a060131 100644 --- a/inventory_provider/config.py +++ b/inventory_provider/config.py @@ -32,6 +32,32 @@ CONFIG_SCHEMA = { "required": ["private-key", "known-hosts"], "additionalProperties": False }, + "ims": { + "type": "object", + "properties": { + "api": {"type": "string"}, + "username": {"type": "string"}, + "password": {"type": "string"} + }, + "required": ["api", "username", "password"], + "additionalProperties": False + }, + "otrs-export": { + "type": "object", + "properties": { + "username": {"type": "string"}, + "private-key": {"type": "string"}, + "known-hosts": {"type": "string"}, + "destination": {"type": "string"} + }, + "required": [ + "username", + "private-key", + "known-hosts", + "destination" + ], + "additionalProperties": False + }, "redis-credentials": { "type": "object", "properties": { @@ -73,6 +99,8 @@ CONFIG_SCHEMA = { "ssh": {"$ref": "#/definitions/ssh-credentials"}, "redis": {"$ref": "#/definitions/redis-credentials"}, "sentinel": {"$ref": "#/definitions/redis-sentinel-config"}, + "ims": {"$ref": "#/definitions/ims"}, + "otrs-export": {"$ref": "#/definitions/otrs-export"}, "redis-databases": { "type": "array", "minItems": 1, @@ -91,6 +119,8 @@ CONFIG_SCHEMA = { "ssh", "redis", "redis-databases", + "otrs-export", + "ims", "managed-routers"] }, { @@ -99,6 +129,8 @@ CONFIG_SCHEMA = { "ssh", "sentinel", "redis-databases", + "otrs-export", + "ims", "managed-routers"] } ], diff --git a/inventory_provider/db/ims.py b/inventory_provider/db/ims.py new file mode 100644 index 0000000000000000000000000000000000000000..fd6b51dc863fab99a0d7a3efcb560dcec097c069 --- /dev/null +++ b/inventory_provider/db/ims.py @@ -0,0 +1,229 @@ +import requests +import time + +from enum import Enum + + +# Navigation Properties +# http://149.210.162.190:81/ImsVersions/4.19.9/html/86d07a57-fa45-835e-d4a2-a789c4acbc96.htm # noqa +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, + 'CustomerType': 262144 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/2d27d509-77cb-537d-3ffa-796de7e82af8.htm # noqa +NODE_PROPERTIES = { + 'EquipmentDefinition': 16, + 'ManagementSystem': 128, + 'Site': 256, + 'NodeCity': 32768, + 'Order': 67108864, + 'NodeCountry': 1073741824 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/347cb410-8c05-47bd-ceb0-d1dd05bf98a4.htm # noqa +CITY_PROPERTIES = { + 'Country': 8 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/a8dc6266-d934-8162-4a55-9e1648187f2c.htm # noqa +EQUIP_DEF_PROPERTIES = { + 'Nodes': 4096 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/9c8d50f0-842c-5959-0fa6-14e1720669ec.htm # noqa +SITE_PROPERTIES = { + 'City': 2, + 'SiteAliases': 64, + 'Country': 256 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/8ce06cb7-7707-46c4-f02f-86083310d81b.htm # noqa +VENDOR_PROPERTIES = { + 'VendorRelatedContacts': 64, + 'VendorType': 1024 +} +# http://149.210.162.190:81/ImsVersions/4.19.9/html/62e7aa63-aff0-6992-7697-377ace239c4f.htm # noqa +VENDOR_RELATED_CONTACT_PROPERTIES = { + 'Vendor': 8, + 'Contact': 16 +} + + +class InventoryStatus(Enum): + PLANNED = 1 + READY_FOR_SERVICE = 2 + IN_SERVICE = 3 + MIGRATION = 4 + OUT_OF_SERVICE = 6 + READY_FOR_CEASURE = 7 + + +class RelateType(Enum): + VENDOR = 1 + CONTACT = 2 + GROUP = 3 + CONTRACT = 4 + CUSTOMER = 5 + SITE = 6 + + +class IMSError(Exception): + pass + + +class IMS(object): + + TIMEOUT_THRESHOLD = 1200 + NO_OF_ELEMENTS_PER_ITERATION = 50 + PERMITTED_RECONNECT_ATTEMPTS = 3 + LOGIN_PATH = '/login' + IMS_PATH = '/ims' + + cache = {} + base_url = None + bearer_token = None + bearer_token_init_time = 0 + reconnect_attempts = 0 + + def __init__(self, base_url, username, password, bearer_token=None): + IMS.base_url = base_url + self.username = username + self.password = password + IMS.bearer_token = bearer_token + + @classmethod + def _init_bearer_token(cls, username, password): + re_init_time = time.time() + if not cls.bearer_token or \ + re_init_time - cls.bearer_token_init_time \ + > cls.TIMEOUT_THRESHOLD: + cls.reconnect_attempts = 0 + else: + cls.reconnect_attempts += 1 + if cls.reconnect_attempts > cls.PERMITTED_RECONNECT_ATTEMPTS: + raise IMSError('Too many reconnection attempts made') + + response = requests.post( + cls.base_url + cls.LOGIN_PATH, + auth=(username, password)) + response.raise_for_status() + cls.bearer_token_init_time = re_init_time + cls.bearer_token = response.json() + + def _get_entity( + self, + url, + params=None, + navigation_properties=None, + use_cache=False): + url = f'{self.base_url + IMS.IMS_PATH}/{url}' + cache_key = url + if navigation_properties: + params = params if params else {} + params['navigationproperty'] = navigation_properties if isinstance( + navigation_properties, int) else sum(navigation_properties) + + if use_cache: + if params: + s = '-'.join( + [f'{t}::{params[t]}' + for t in sorted(params)]) + cache_key = f'{cache_key}::{s}' + entity = IMS.cache.get(cache_key, None) + if entity: + return entity + + if not IMS.bearer_token: + IMS._init_bearer_token(self.username, self.password) + + def _is_invalid_login_state(response_): + if response_.status_code == requests.codes.unauthorized: + return True + + if response_.status_code == requests.codes.ok: + r = response_.json() + if r and 'HasErrors' in r and r['HasErrors']: + for e in r['Errors']: + if 'Guid expired' in e['ErrorMessage']: + return True + + return False + + while True: + response = requests.get( + url, + headers={'Authorization': self.bearer_token}, + params=params) + if _is_invalid_login_state(response): + IMS._init_bearer_token(self.username, self.password) + else: + response.raise_for_status() + return_value = response.json() + + if use_cache: + IMS.cache[cache_key] = return_value + return return_value + + def get_entity_by_id( + self, + entity_type, + entity_id, + navigation_properties=None, + use_cache=False): + + url = f'{entity_type}/{entity_id}' + return \ + self._get_entity(url, None, navigation_properties, use_cache) + + def get_entity_by_name( + self, + entity, + name, + navigation_properties=None, + use_cache=False): + url = f'{entity}/byname/{name}' + return self._get_entity(url, None, navigation_properties, use_cache) + + def get_filtered_entities( + self, + entity, + filter_string, + navigation_properties=None, + use_cache=False): + more_to_come = True + start_entity = 0 + while more_to_come: + params = { + 'paginatorStartElement': start_entity, + 'paginatorNumberOfElements': IMS.NO_OF_ELEMENTS_PER_ITERATION + } + url = f'{entity}/filtered/{filter_string}' + entities = self._get_entity( + url, + params, + navigation_properties, + use_cache) + more_to_come = False + if entities: + more_to_come = \ + len(entities) >= IMS.NO_OF_ELEMENTS_PER_ITERATION + start_entity += IMS.NO_OF_ELEMENTS_PER_ITERATION + yield from entities + + def get_all_entities( + self, + entity, + navigation_properties=None, + use_cache=False): + yield from self.get_filtered_entities( + entity, + 'Id <> 0', + navigation_properties, + use_cache) diff --git a/inventory_provider/db/ims_data.py b/inventory_provider/db/ims_data.py new file mode 100644 index 0000000000000000000000000000000000000000..11dc04dfe2199df5201052fb82c30b40d6e4b3d5 --- /dev/null +++ b/inventory_provider/db/ims_data.py @@ -0,0 +1,246 @@ +import logging +import re +from collections import OrderedDict + +from inventory_provider import environment +from inventory_provider.db import ims +from inventory_provider.db.ims import InventoryStatus + +environment.setup_logging() +logger = logging.getLogger(__name__) + +INTERNAL_POP_NAMES = { + 'Cambridge OC', + 'DANTE Lab', + 'GÉANT LAB', + 'GEANT LAB', + 'Amsterdam GEANT Office', + 'Amsterdam GÉANT Office' +} + + +def lookup_lg_routers(ds): + pattern = re.compile("vpn-proxy|vrr|taas", re.IGNORECASE) + + def _matching_node(node_): + if InventoryStatus(node_['InventoryStatusId']) not in [ + InventoryStatus.IN_SERVICE, + InventoryStatus.PLANNED # remove once data fully migrated + ]: + return False + + if pattern.match(node_['Name']): + return False + + return True + + site_nav_props = [ + ims.SITE_PROPERTIES['SiteAliases'], + ims.SITE_PROPERTIES['City'], + ims.SITE_PROPERTIES['Country'] + ] + + eq_definitions = ds.get_filtered_entities( + 'EquipmentDefinition', + 'Name like mx', + ims.EQUIP_DEF_PROPERTIES['Nodes']) + + for eq_def in eq_definitions: + nodes = eq_def['Nodes'] + + for node in nodes: + if not _matching_node(node): + continue + + site = ds.get_entity_by_id('Site', node['SiteId'], site_nav_props, + True) + city = site['City'] + + abbreviation = '' + try: + abbreviation = site['SiteAliases'][0]['AliasName'] + except IndexError: + pass # no alias - ignore silently + + eq = { + 'equipment name': node['Name'], + 'type': + 'INTERNAL' + if site['Name'] in INTERNAL_POP_NAMES + else 'CORE', + 'pop': { + 'name': site['Name'], + 'city': city['Name'], + 'country': city['Country']['Name'], + 'country code': city['Country']['Abbreviation'], + 'abbreviation': abbreviation, + 'longitude': site['Longitude'], + 'latitude': site['Latitude'], + } + } + yield(eq) + + +def lookup_pop_info(ds, hostname): + site_nav_props = [ + ims.SITE_PROPERTIES['City'], + ims.SITE_PROPERTIES['SiteAliases'], + ims.SITE_PROPERTIES['Country'] + ] + + node = ds.get_entity_by_name('Node', hostname) + if not node: + return None + site = ds.get_entity_by_id('Site', node['SiteId'], site_nav_props, True) + city = site['City'] + abbreviation = '' + try: + abbreviation = site['SiteAliases'][0]['AliasName'] + except IndexError: + pass # no alias - ignore silently + eq = { + 'equipment-name': node['Name'], + 'status': InventoryStatus(node['InventoryStatusId']).name, + 'pop': { + 'name': site['Name'], + 'city': city['Name'], + 'country': city['Country']['Name'], + 'abbreviation': abbreviation, + 'longitude': site['Longitude'], + 'latitude': site['Latitude'], + } + } + return eq + + +def otrs_get_customer_company_rows(ds): + yield ['customer_id', 'name', 'street', 'zip', 'city', 'country', 'url', + 'comments'] + all_cus_comps = set() + for customer in ds.get_all_entities('Customer'): + all_cus_comps.add(customer['Name']) + yield [customer['Name'].replace(' ', ''), customer['Name'], + '', '', '', '', '', ''] + for vendor in ds.get_all_entities('Vendor'): + if vendor['Name'] not in all_cus_comps: + all_cus_comps.add(vendor['Name']) + yield [vendor['Name'].replace(' ', ''), vendor['Name'], + '', '', '', '', '', ''] + + +# TODO - check the rules for validation once model has been confirmed +def _is_valid_customer(cus): + if not cus['email']: + return False + return True + + +def otrs_get_customer_contacts(ds): + + def _get_customer_id2(t): + if t['Id'] == 3 or t['Name'] == 'EU NREN': + return 'OTRS-GEANT-NREN' + return '' + + for customer in ds.get_all_entities( + 'Customer', + [ + ims.CUSTOMER_PROPERTIES['CustomerRelatedContacts'], + ims.CUSTOMER_PROPERTIES['CustomerType'] + ]): + + if customer['CustomerRelatedContacts']: + + for contact in customer['CustomerRelatedContacts']: + t_customer_user = OrderedDict({ + 'email': contact['Contact']['Mail'], + 'username': contact['Contact']['Mail'], # TODO if tal_id is going to be present use that # noqa + 'customer_id': customer['Name'].replace(' ', ''), + 'customer_id_2': + _get_customer_id2(customer['CustomerType']), + 'title': '', + 'firstname': contact['Contact']['Name'], + 'lastname': + ' '.join(filter(None, [ + contact['Contact']['InFix'], + contact['Contact']['LastName'] + ])), + 'phone': '', + 'fax': '', + 'mobile': '', + 'street': '', + 'zip': '', + 'city': '', + 'country': '', + 'comments': '', + }) + if not _is_valid_customer(t_customer_user): + continue + + yield t_customer_user + + +def otrs_get_vendor_contacts(ds): + + for vrc in ds.get_all_entities( + 'VendorRelatedContact', + [ + ims.VENDOR_RELATED_CONTACT_PROPERTIES['Vendor'], + ims.VENDOR_RELATED_CONTACT_PROPERTIES['Contact'] + ]): + t_customer_user = OrderedDict({ + 'email': vrc['Contact']['Mail'], + 'username': vrc['Contact']['Mail'], # TODO if tal_id is going to be present use that # noqa + 'customer_id': vrc['Vendor']['Name'].replace(' ', ''), + 'customer_id_2': '', + 'title': '', + 'firstname': vrc['Contact']['Name'], + 'lastname': + ' '.join(filter(None, [ + vrc['Contact']['InFix'], + vrc['Contact']['LastName'] + ])), + 'phone': '', + 'fax': '', + 'mobile': '', + 'street': '', + 'zip': '', + 'city': '', + 'country': '', + 'comments': '', + }) + if not _is_valid_customer(t_customer_user): + continue + + yield t_customer_user + + +def otrs_get_customer_users_rows(ds): + yield ['email', 'username', 'customer_id', 'customer_id_2', 'title', + 'firstname', 'lastname', 'phone', 'fax', 'mobile', 'street', 'zip', + 'city', 'country', 'comments'] + + def get_all_cus_user_rows(): + yielded_customer_emails = set() + for c in otrs_get_customer_contacts(ds): + yielded_customer_emails.add(c['email']) + yield c + for c in otrs_get_vendor_contacts(ds): + if c['email'] not in yielded_customer_emails: + yield c + + sorted_cus = sorted(get_all_cus_user_rows(), key=lambda x: x['email']) + duplicate_emails = set() + previous_email = None + for cu in sorted_cus: + if cu['email'] == previous_email: + duplicate_emails.add(previous_email) + previous_email = cu['email'] + if duplicate_emails: + logger.error('Duplicate emails found in OTRS customer-user export: ' + f'{duplicate_emails}') + # raise KeyError('Duplicate emails found in OTRS customer-user export: ' # noqa + # f'{duplicate_emails}') + + for cu in sorted_cus: + yield list(cu.values()) diff --git a/inventory_provider/routes/ims_lg.py b/inventory_provider/routes/ims_lg.py new file mode 100644 index 0000000000000000000000000000000000000000..79d7930287796f664b30a78d90dfb396e2f12f93 --- /dev/null +++ b/inventory_provider/routes/ims_lg.py @@ -0,0 +1,60 @@ +import json + +from flask import Blueprint, jsonify, Response + +from inventory_provider.routes import common + +routes = Blueprint("ims-lg-query-routes", __name__) + +ACCESS_PUBLIC = 'public' +ACCESS_INTERNAL = 'all' + + +@routes.after_request +def after_request(resp): + return common.after_request(resp) + + +@routes.route("/routers/<string:access>", methods=['GET', 'POST']) +@common.require_accepts_json +def routers(access): + + if access not in {ACCESS_INTERNAL, ACCESS_PUBLIC}: + return Response( + response='unknown access level', + status=404, + mimetype='text/html') + + redis = common.get_current_redis() + + def _visible(router): + if access == ACCESS_INTERNAL: + return True + return router['type'] == 'CORE' + + def _routers(): + i = 0 + for k in redis.scan_iter(f'ims:lg:*'): + rtr = redis.get(k.decode('utf-8')).decode('utf-8') + rtr = json.loads(rtr) + i += 1 + if _visible(rtr): + yield rtr + + cache_key = f'classifier-cache:ims-lg:{access}' + result = redis.get(cache_key) + + if result: + result = json.loads(result.decode('utf-8')) + else: + result = list(_routers()) + # cache this data for the next call + redis.set(cache_key, json.dumps(result).encode('utf-8')) + + if not result: + return Response( + response=f'no routers found for access level {access}', + status=404, + mimetype="text/html") + + return jsonify(result) diff --git a/inventory_provider/routes/ims_otrs.py b/inventory_provider/routes/ims_otrs.py new file mode 100644 index 0000000000000000000000000000000000000000..cbae9e9e740f7de090b20b542e9f4439cc89af88 --- /dev/null +++ b/inventory_provider/routes/ims_otrs.py @@ -0,0 +1,68 @@ +import csv +import html +from io import StringIO + +import requests +from flask import Blueprint, request, Response, current_app + +from inventory_provider.db import ims_data +from inventory_provider.db.ims import IMS +from inventory_provider.routes import common +from inventory_provider.tasks.ims_worker import OTRSFiles, export_data_for_otrs + +routes = Blueprint("otrs", __name__) + + +@routes.after_request +def after_request(resp): + return common.after_request(resp) + + +def get_otrs_data(fn): + ims_config = current_app.config['INVENTORY_PROVIDER_CONFIG']["ims"] + ds = IMS( + ims_config['api'], + ims_config['username'], + ims_config['password']) + + with StringIO() as sio: + writer = csv.writer(sio, delimiter='^') + writer.writerows(fn(ds)) + data = sio.getvalue() + return Response( + response=data, + status=requests.codes.ok, + mimetype="text/html") + + +@routes.route('customer-companies') +def get_customer_companies_data(): + return get_otrs_data(ims_data.otrs_get_customer_company_rows) + + +@routes.route('customer-users') +def get_customer_users_data(): + return get_otrs_data(ims_data.otrs_get_customer_users_rows) + + +@routes.route('export') +def send_exports(): + files_value = request.args.get('files', None) + if files_value: + try: + files_value = int(files_value) + except ValueError: + return Response( + response=html.escape('<files> should be an Integer'), + status=requests.codes.bad_request, + mimetype="text/html") + if files_value < 0 or files_value > sum(OTRSFiles): + return Response( + response=html.escape(f'Bad value for <files> {files_value}'), + status=requests.codes.bad_request, + mimetype="text/html") + task = export_data_for_otrs.delay(files_value) + return Response( + response=task.id, + status=requests.codes.ok, + mimetype="text/html") diff --git a/inventory_provider/routes/otrs_jobs.py b/inventory_provider/routes/otrs_jobs.py new file mode 100644 index 0000000000000000000000000000000000000000..6de4678de1b8d27c5cb373d9f5208bf3ea6a5e0b --- /dev/null +++ b/inventory_provider/routes/otrs_jobs.py @@ -0,0 +1,37 @@ +import html + +import requests +from flask import Blueprint, request, Response + +from inventory_provider.routes import common +from inventory_provider.tasks.ims_worker import OTRSFiles, export_data_for_otrs + +routes = Blueprint("otrs", __name__) + + +@routes.after_request +def after_request(resp): + return common.after_request(resp) + + +@routes.route('export') +def send_exports(): + files_value = request.args.get('files', None) + if files_value: + try: + files_value = int(files_value) + except ValueError: + return Response( + response=html.escape('<files> should be an Integer'), + status=requests.codes.bad_request, + mimetype="text/html") + if files_value < 0 or files_value > sum(OTRSFiles): + return Response( + response=html.escape(f'Bad value for <files> {files_value}'), + status=requests.codes.bad_request, + mimetype="text/html") + task = export_data_for_otrs.delay(files_value) + return Response( + response=task.id, + status=requests.codes.ok, + mimetype="text/html") diff --git a/inventory_provider/routes/testing.py b/inventory_provider/routes/testing.py index cbb06abe2967577a5c4aa8eb851d4c05a77dfaed..8900bfd813c5a079d56abf111cf4cbcc803bbca6 100644 --- a/inventory_provider/routes/testing.py +++ b/inventory_provider/routes/testing.py @@ -7,7 +7,7 @@ from lxml import etree from inventory_provider import juniper from inventory_provider.routes import common -from inventory_provider.tasks import worker +from inventory_provider.tasks import worker, ims_worker from inventory_provider.tasks import common as worker_common routes = Blueprint("inventory-data-testing-support-routes", __name__) @@ -19,6 +19,16 @@ def flushdb(): return Response('OK') +# IMS routes + +@routes.route("update-lg-routers-ims", methods=['GET', 'POST']) +def update_lg_routers_ims(): + ims_worker.update_lg_routers_ims.delay() + return Response('OK') + +# End of IMS routes + + @routes.route("update-interfaces-to-services", methods=['GET', 'POST']) def update_interfaces_to_services(): worker.update_interfaces_to_services.delay() diff --git a/inventory_provider/tasks/ims_worker.py b/inventory_provider/tasks/ims_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..152591a60c5041155625a4e486a946dcb1f03720 --- /dev/null +++ b/inventory_provider/tasks/ims_worker.py @@ -0,0 +1,89 @@ +import csv +import json +import logging +import subprocess +import tempfile +from datetime import datetime +from enum import IntFlag +from pathlib import Path + +from inventory_provider.db import ims_data +from inventory_provider.db.ims import IMS +from inventory_provider import environment +from inventory_provider.tasks.app import app +from inventory_provider.tasks.common import get_next_redis +from inventory_provider.tasks.worker import InventoryTask, \ + log_task_entry_and_exit + +environment.setup_logging() + +logger = logging.getLogger(__name__) + + +@app.task(base=InventoryTask, bind=True) +@log_task_entry_and_exit +def update_lg_routers_ims(self): + logger.debug('>>> update_lg_routers_ims') + + r = get_next_redis(InventoryTask.config) + for k in r.scan_iter('ims:lg:*'): + r.delete(k) + c = InventoryTask.config["ims"] + ds = IMS(c['api'], c['username'], c['password']) + + for router in ims_data.lookup_lg_routers(ds): + r.set(f'ims:lg:{router["equipment name"]}', json.dumps(router)) + + logger.debug('<<< update_lg_routers_ims') + + +class OTRSFiles(IntFlag): + CUSTOMER_COMPANIES = 1 + CUSTOMER_USERS = 2 + + +@app.task(base=InventoryTask, bind=True) +@log_task_entry_and_exit +def export_data_for_otrs(self, files_to_export=None): + if files_to_export: + files_to_export = OTRSFiles(files_to_export) + else: + files_to_export = set(OTRSFiles) + + logger.debug('>>> export_data_for_otrs_ims') + ims_config = InventoryTask.config["ims"] + otrs_config = InventoryTask.config["otrs-export"] + + command_template = 'rsync -aP --rsh="ssh -l {user} -p 22 -i {key_file} -o \'UserKnownHostsFile {known_hosts}\'" {source_dir}/* {destination}' # noqa + + with tempfile.TemporaryDirectory() as temp_dir: + temp_path = Path(temp_dir) + ds = IMS( + ims_config['api'], + ims_config['username'], + ims_config['password']) + + prefix = datetime.now().strftime('%Y%m%d') + '_' + + if OTRSFiles.CUSTOMER_COMPANIES in files_to_export: + cus_co_path = temp_path.joinpath(f'{prefix}customer_company.csv') + with open(cus_co_path, 'w+') as f: + writer = csv.writer(f, delimiter='^') + writer.writerows(ims_data.otrs_get_customer_company_rows(ds)) + + if OTRSFiles.CUSTOMER_USERS in files_to_export: + cus_usr_path = temp_path.joinpath(f'{prefix}customer_user.csv') + with open(cus_usr_path, 'w+') as f: + writer = csv.writer(f, delimiter='^') + writer.writerows(ims_data.otrs_get_customer_users_rows(ds)) + + command = command_template.format( + user=otrs_config['username'], + key_file=otrs_config['private-key'], + known_hosts=otrs_config['known-hosts'], + source_dir=temp_dir, + destination=otrs_config['destination'] + ) + subprocess.run(command, shell=True, check=True) + + logger.debug('<<< export_data_for_otrs_ims') diff --git a/test/conftest.py b/test/conftest.py index ee70afa1b0b49a3bd7ef9f6cc7f3e5f9bfa82758..c783073e0d97144f5d1dc8293125b71be4410553 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -42,6 +42,17 @@ def data_config_filename(): "socket_timeout": 2.8 }, "redis-databases": [0, 7], + "otrs-export": { + "username": "otrs_username", + "private-key": "otrs_ky_loc", + "destination": "otrs_dest", + "known-hosts": "otrs_known_hosts" + }, + "ims": { + "api": "ims_api", + "username": "ims_username", + "password": "ims_password" + }, "managed-routers": "bogus url", } diff --git a/test/data/ims_lg_data.json b/test/data/ims_lg_data.json new file mode 100644 index 0000000000000000000000000000000000000000..842f42047f7957099b6dd4758549f5eef73a4e0f --- /dev/null +++ b/test/data/ims_lg_data.json @@ -0,0 +1,3462 @@ +[ + { + "AcPowerConsumption": null, + "CardCodeDefinitions": null, + "CardDefinitions": null, + "ChildEquipmentDefinitionRelations": null, + "CommandsGroup": null, + "CommandsGroupId": null, + "ContractId": null, + "DcPowerConsumption": null, + "DefPhysSpeeds": "1GBE|10GBE|40GBE", + "DefaultAngle": null, + "DefaultCustomer": null, + "DefaultCustomerId": null, + "DefaultDomain": null, + "DefaultDomainId": null, + "DefaultLayer": "", + "DefaultManagementSystem": null, + "DefaultManagementSystemId": null, + "DefaultPlatformName": "", + "DefaultRange": null, + "DepreciationPeriod": null, + "Depth": 475, + "Description": "", + "EndOfLive": null, + "EndOfMainContract": null, + "EndOfSale": null, + "EqDefVariant": "", + "EquipmentDefinitionCounts": null, + "EquipmentKind": "SWITCH", + "EquipmentPicture": "", + "Errors": null, + "ExtraInfo": "", + "HasErrors": false, + "HasSwPort": null, + "HeatEmission": null, + "HeatProduction": null, + "Height": 44, + "Id": 6931, + "InternalPortTemplates": null, + "IsIpType": null, + "IsVirtual": 0, + "Klm": null, + "MaterialTypes": null, + "Name": "JUNIPER MX204", + "NodeNameTemplate": "", + "NodeTemplates": null, + "Nodes": [ + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-11T21:28:45", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6931, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129057, + "InServiceDate": "2020-02-20T20:13:23", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX3.LAB.OFFICE.GEANT.NET", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:13:23", + "Sectors": null, + "SerialNumber": "BT332", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 444979, + "Sla": "", + "SoftwareVersion": "18.4R2-S3", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-11T21:28:43", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6931, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129055, + "InServiceDate": "2020-02-20T20:15:20", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.LAB.OFFICE.GEANT.NET", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:15:20", + "Sectors": null, + "SerialNumber": "BT500", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 444979, + "Sla": "", + "SoftwareVersion": "18.4R2-S3", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-11T21:28:43", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6931, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129054, + "InServiceDate": "2020-02-20T20:21:15", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1-204.TAL.EE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:21:15", + "Sectors": null, + "SerialNumber": "BT798", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445221, + "Sla": "", + "SoftwareVersion": "17.4R1.16", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-11T21:28:42", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6931, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129053, + "InServiceDate": "2020-02-20T20:22:05", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX4.LAB.OFFICE.GEANT.NET", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:22:05", + "Sectors": null, + "SerialNumber": "BJ899", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 444979, + "Sla": "", + "SoftwareVersion": "18.4R2-S3", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + } + ], + "NumberOfUnits": 0.59, + "OwnerRules": null, + "ParentEquipmentDefinitionRelations": null, + "PartOfMaintContract": "", + "PortTemplates": null, + "PowerConsume": null, + "RateAcPower": null, + "RateDcPower": null, + "RateVolume": 1, + "ReconcileEquipmentDefinitions": null, + "RedundantType": "", + "RowVersion": "2020-02-11T17:17:19", + "Shape": "SWITCH", + "ShapeColor": "GOLD", + "ShapeText": "MX204", + "ShelfDefinitions": null, + "SlotDefinitions": null, + "Templates": null, + "Vendor": null, + "VendorEquipmentDefinitionName": "JNP204 [MX204]", + "VendorId": 2702, + "Width": 447, + "_Height": 44, + "_Width": 447 + }, + { + "AcPowerConsumption": null, + "CardCodeDefinitions": null, + "CardDefinitions": null, + "ChildEquipmentDefinitionRelations": null, + "CommandsGroup": null, + "CommandsGroupId": null, + "ContractId": null, + "DcPowerConsumption": null, + "DefPhysSpeeds": "10GBE|40GBE|1GBE|100GBE", + "DefaultAngle": null, + "DefaultCustomer": null, + "DefaultCustomerId": null, + "DefaultDomain": null, + "DefaultDomainId": 2686, + "DefaultLayer": "", + "DefaultManagementSystem": null, + "DefaultManagementSystemId": null, + "DefaultPlatformName": "", + "DefaultRange": null, + "DepreciationPeriod": null, + "Depth": 0, + "Description": "", + "EndOfLive": null, + "EndOfMainContract": null, + "EndOfSale": null, + "EqDefVariant": "", + "EquipmentDefinitionCounts": null, + "EquipmentKind": "ROUTER", + "EquipmentPicture": "MX80-FRONT-HIGH.JPG", + "Errors": null, + "ExtraInfo": "", + "HasErrors": false, + "HasSwPort": 0, + "HeatEmission": null, + "HeatProduction": null, + "Height": 350, + "Id": 6948, + "InternalPortTemplates": null, + "IsIpType": 1, + "IsVirtual": 0, + "Klm": 0, + "MaterialTypes": null, + "Name": "JUNIPER MX480", + "NodeNameTemplate": "", + "NodeTemplates": null, + "Nodes": [ + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:13", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129085, + "InServiceDate": "2020-02-20T20:23:03", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.KAU.LT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:23:03", + "Sectors": null, + "SerialNumber": "JN11F26CEAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445307, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:08", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129075, + "InServiceDate": "2020-02-20T20:19:39", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.KAU.LT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:19:39", + "Sectors": null, + "SerialNumber": "JN11FD720AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445307, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:12", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129084, + "InServiceDate": "2020-02-20T20:21:52", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.TAL.EE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:21:52", + "Sectors": null, + "SerialNumber": "JN11FD433AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445221, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:06", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129070, + "InServiceDate": "2020-02-20T20:22:48", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.LIS.PT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:22:48", + "Sectors": null, + "SerialNumber": "JN1203F78AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445245, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:07", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129071, + "InServiceDate": "2020-02-20T20:12:47", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.BRU.BE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:12:47", + "Sectors": null, + "SerialNumber": "JN11F2694AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445265, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:07", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129073, + "InServiceDate": "2020-02-20T20:13:06", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.MAR.FR", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:13:06", + "Sectors": null, + "SerialNumber": "JN11FD778AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445257, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:12", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129082, + "InServiceDate": "2020-02-20T20:19:01", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.ZAG.HR", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:19:01", + "Sectors": null, + "SerialNumber": "JN11F16E7AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445315, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:12", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129083, + "InServiceDate": "2020-02-20T20:19:53", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.LJU.SI", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:19:53", + "Sectors": null, + "SerialNumber": "JN11F2731AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445309, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:14", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129088, + "InServiceDate": "2020-02-20T20:19:19", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.LIS.PT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-26T20:14:42", + "Sectors": null, + "SerialNumber": "JN11F2ABEAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": 0, + "ShouldNotBeRatedDcPower": 0, + "ShouldNotBeRatedDiesel": 0, + "ShouldNotBeRatedVolume": 0, + "Site": null, + "SiteId": 445245, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:11", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129081, + "InServiceDate": "2020-02-20T20:20:52", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.TAL.EE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:20:52", + "Sectors": null, + "SerialNumber": "JN11F1715AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445221, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:08", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129074, + "InServiceDate": "2020-02-20T20:21:01", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.RIG.LV", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:21:02", + "Sectors": null, + "SerialNumber": "JN11F70ABAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445313, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:07", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129072, + "InServiceDate": "2020-02-20T20:21:38", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.ATH.GR", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:21:38", + "Sectors": null, + "SerialNumber": "JN1200095AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445247, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-11T21:28:50", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129061, + "InServiceDate": "2020-02-20T20:20:19", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.SOF.BG", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:20:19", + "Sectors": null, + "SerialNumber": "JN11FD3C6AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445233, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:04", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129532, + "InServiceDate": "2020-02-25T15:32:35", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.DUB2.IE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:32:35", + "Sectors": null, + "SerialNumber": "JN11FD43CAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445252, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:03", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129529, + "InServiceDate": "2020-02-25T15:34:04", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.DUB.IE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:34:04", + "Sectors": null, + "SerialNumber": "JN11F2B83AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445251, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:38:59", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129525, + "InServiceDate": "2020-02-25T15:34:43", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.BUC.RO", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:34:43", + "Sectors": null, + "SerialNumber": "JN11F2AECAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445290, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:05", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129533, + "InServiceDate": "2020-02-25T15:32:48", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.HAM.DE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:32:48", + "Sectors": null, + "SerialNumber": "JN11FB3EAAFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445246, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:03", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6948, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 05", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129530, + "InServiceDate": "2020-02-25T15:34:14", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.ATH2.GR", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:34:14", + "Sectors": null, + "SerialNumber": "JN1251841AFB", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445169, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + } + ], + "NumberOfUnits": 0.0, + "OwnerRules": 0, + "ParentEquipmentDefinitionRelations": null, + "PartOfMaintContract": "", + "PortTemplates": null, + "PowerConsume": null, + "RateAcPower": null, + "RateDcPower": null, + "RateVolume": 1, + "ReconcileEquipmentDefinitions": null, + "RedundantType": "", + "RowVersion": "2020-02-11T18:32:05", + "Shape": "DISH", + "ShapeColor": "RED", + "ShapeText": "MX48", + "ShelfDefinitions": null, + "SlotDefinitions": null, + "Templates": null, + "Vendor": null, + "VendorEquipmentDefinitionName": "MX480", + "VendorId": 2702, + "Width": 432, + "_Height": 350, + "_Width": 432 + }, + { + "AcPowerConsumption": null, + "CardCodeDefinitions": null, + "CardDefinitions": null, + "ChildEquipmentDefinitionRelations": null, + "CommandsGroup": null, + "CommandsGroupId": null, + "ContractId": null, + "DcPowerConsumption": null, + "DefPhysSpeeds": "10GBE|40GBE|1GBE|100GBE", + "DefaultAngle": null, + "DefaultCustomer": null, + "DefaultCustomerId": null, + "DefaultDomain": null, + "DefaultDomainId": 2686, + "DefaultLayer": "", + "DefaultManagementSystem": null, + "DefaultManagementSystemId": null, + "DefaultPlatformName": "", + "DefaultRange": null, + "DepreciationPeriod": null, + "Depth": 584, + "Description": "", + "EndOfLive": null, + "EndOfMainContract": null, + "EndOfSale": null, + "EqDefVariant": "", + "EquipmentDefinitionCounts": null, + "EquipmentKind": "ROUTER", + "EquipmentPicture": "", + "Errors": null, + "ExtraInfo": "", + "HasErrors": false, + "HasSwPort": 0, + "HeatEmission": null, + "HeatProduction": null, + "Height": 705, + "Id": 6959, + "InternalPortTemplates": null, + "IsIpType": 1, + "IsVirtual": 0, + "Klm": 0, + "MaterialTypes": null, + "Name": "JUNIPER MX960", + "NodeNameTemplate": "", + "NodeTemplates": null, + "Nodes": [ + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:10", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129078, + "InServiceDate": "2020-02-20T20:11:32", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.PRA.CZ", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:11:37", + "Sectors": null, + "SerialNumber": "JN11F16CBAFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445312, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:11", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129080, + "InServiceDate": "2020-02-20T20:17:37", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.VIE.AT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:17:37", + "Sectors": null, + "SerialNumber": "JN11F27A2AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445256, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:13", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 03", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129086, + "InServiceDate": "2020-02-20T20:12:25", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX2.BRA.SK", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:12:25", + "Sectors": null, + "SerialNumber": "JN11A171DAFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445295, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:09", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129076, + "InServiceDate": "2020-02-20T20:14:55", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.POZ.PL", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:14:55", + "Sectors": null, + "SerialNumber": "JN11F6654AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445215, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:09", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129077, + "InServiceDate": "2020-02-20T20:13:29", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.PAR.FR", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:13:29", + "Sectors": null, + "SerialNumber": "JN11FD477AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445255, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:10", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129079, + "InServiceDate": "2020-02-20T20:16:36", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.LON.UK", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:16:37", + "Sectors": null, + "SerialNumber": "JN11FD747AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445244, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:14", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129087, + "InServiceDate": "2020-02-20T20:14:14", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.LON2.UK", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:14:14", + "Sectors": null, + "SerialNumber": "JN11F702BAFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445317, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:03", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129068, + "InServiceDate": "2020-02-20T20:15:25", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.MIL2.IT", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:15:25", + "Sectors": null, + "SerialNumber": "JN11F6FB2AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445287, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-12T09:06:06", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 6727, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129069, + "InServiceDate": "2020-02-20T20:16:03", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.MAD.ES", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-20T20:16:04", + "Sectors": null, + "SerialNumber": "JN12038B7AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445082, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:02", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129527, + "InServiceDate": "2020-02-25T15:33:07", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.BUD.HU", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:33:07", + "Sectors": null, + "SerialNumber": "JN12002CBAFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445288, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:04", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129531, + "InServiceDate": "2020-02-25T15:34:21", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.GEN.CH", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:34:21", + "Sectors": null, + "SerialNumber": "JN11F26A5AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445235, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:02", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129528, + "InServiceDate": "2020-02-25T15:33:31", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.AMS.NL", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:33:31", + "Sectors": null, + "SerialNumber": "JN12005D3AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445253, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + }, + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-02-25T13:39:01", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8338, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": 2686, + "EquipmentDefinitionId": 6959, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "REV 01", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129526, + "InServiceDate": "2020-02-25T15:34:52", + "InternalPorts": null, + "InventoryStatusId": 3, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 2356, + "MplsProt": "", + "Name": "MX1.FRA.DE", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": null, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-02-25T15:34:52", + "Sectors": null, + "SerialNumber": "JN11F20B6AFA", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445254, + "Sla": "", + "SoftwareVersion": "17.4R2-S6", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + } + ], + "NumberOfUnits": 11.53, + "OwnerRules": 0, + "ParentEquipmentDefinitionRelations": null, + "PartOfMaintContract": "", + "PortTemplates": null, + "PowerConsume": null, + "RateAcPower": null, + "RateDcPower": null, + "RateVolume": 12, + "ReconcileEquipmentDefinitions": null, + "RedundantType": "", + "RowVersion": "2020-02-11T19:22:49", + "Shape": "ROUTER", + "ShapeColor": "GREEN", + "ShapeText": "MX96", + "ShelfDefinitions": null, + "SlotDefinitions": null, + "Templates": null, + "Vendor": null, + "VendorEquipmentDefinitionName": "MX960", + "VendorId": 2702, + "Width": 441, + "_Height": 705, + "_Width": 441 + }, + { + "AcPowerConsumption": null, + "CardCodeDefinitions": null, + "CardDefinitions": null, + "ChildEquipmentDefinitionRelations": null, + "CommandsGroup": null, + "CommandsGroupId": null, + "ContractId": null, + "DcPowerConsumption": null, + "DefPhysSpeeds": "", + "DefaultAngle": null, + "DefaultCustomer": null, + "DefaultCustomerId": null, + "DefaultDomain": null, + "DefaultDomainId": null, + "DefaultLayer": "", + "DefaultManagementSystem": null, + "DefaultManagementSystemId": null, + "DefaultPlatformName": "", + "DefaultRange": null, + "DepreciationPeriod": null, + "Depth": 0, + "Description": "", + "EndOfLive": null, + "EndOfMainContract": null, + "EndOfSale": null, + "EqDefVariant": "", + "EquipmentDefinitionCounts": null, + "EquipmentKind": "ROUTER", + "EquipmentPicture": "", + "Errors": null, + "ExtraInfo": "", + "HasErrors": false, + "HasSwPort": null, + "HeatEmission": null, + "HeatProduction": null, + "Height": 0, + "Id": 7297, + "InternalPortTemplates": null, + "IsIpType": null, + "IsVirtual": 0, + "Klm": null, + "MaterialTypes": null, + "Name": "MX104", + "NodeNameTemplate": "", + "NodeTemplates": null, + "Nodes": [ + { + "AcPowerConsumption": null, + "Angle": null, + "BatteryBackupHoursOrdered": null, + "BridgeDomains": null, + "BuildDate": "2020-03-27T18:05:42", + "Cards": null, + "Configuration": "", + "CreateUser": null, + "CreateUserId": 8439, + "Customer": null, + "CustomerId": null, + "DcPowerConsumption": null, + "DirectionAngle": null, + "Domain": null, + "DomainId": null, + "EquipmentDefinitionId": 7297, + "Errors": null, + "ExtraInfo": "", + "ExtraInfoImportant": 0, + "FuseConsumption": null, + "HardwareBuildNumber": null, + "HardwareRevision": "", + "HasErrors": false, + "HeatEmission": null, + "HeightInRack": null, + "Id": 129856, + "InServiceDate": "2020-03-27T18:05:42", + "InternalPorts": null, + "InventoryStatusId": 2, + "IpAddress": "", + "IpRelates": null, + "LeftInRack": 0, + "ManagementSystem": null, + "ManagementSystemId": 461, + "MplsProt": "", + "Name": "CAREN MX104 ROUTER", + "NetworkAddress": "", + "NetworkMapNodeObject": null, + "NetworkRole": "", + "NodeAliases": null, + "NodeAttachments": null, + "NodeCounts": null, + "Order": null, + "OrderId": null, + "OutOfServiceDate": null, + "ParentNode": null, + "ParentNodeId": null, + "PlMiDate": null, + "PlOosDate": null, + "Ports": null, + "PowerConsume": 0, + "Rack": null, + "RackFrame": null, + "RackFrameId": null, + "RackId": null, + "RackSide": 0, + "Range": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "RateVolume": null, + "ReconcileNodes": null, + "RelatedOrders": null, + "Requestor": "", + "Ring": null, + "RingId": 4230, + "RowVersion": "2020-03-27T18:05:42", + "Sectors": null, + "SerialNumber": "", + "ServiceContract": "", + "Shelves": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "ShouldNotBeRatedVolume": null, + "Site": null, + "SiteId": 445254, + "Sla": "", + "SoftwareVersion": "", + "StockItem": null, + "StockItemId": null, + "SystemAccountNodeRelations": null, + "Ups": null, + "UpsInfo": "", + "Variant": "", + "VmInternalPortRelateList": null, + "VmPortRelateList": null + } + ], + "NumberOfUnits": null, + "OwnerRules": null, + "ParentEquipmentDefinitionRelations": null, + "PartOfMaintContract": "", + "PortTemplates": null, + "PowerConsume": null, + "RateAcPower": null, + "RateDcPower": null, + "RateVolume": null, + "ReconcileEquipmentDefinitions": null, + "RedundantType": "", + "RowVersion": "2020-03-27T17:35:59", + "Shape": "", + "ShapeColor": "", + "ShapeText": "", + "ShelfDefinitions": null, + "SlotDefinitions": null, + "Templates": null, + "Vendor": null, + "VendorEquipmentDefinitionName": "", + "VendorId": 2702, + "Width": 0, + "_Height": 0, + "_Width": 0 + } +] \ No newline at end of file diff --git a/test/data/ims_otrs_customers.json b/test/data/ims_otrs_customers.json new file mode 100644 index 0000000000000000000000000000000000000000..c5da5600087ba4175a495f9ad802674ce684db6b --- /dev/null +++ b/test/data/ims_otrs_customers.json @@ -0,0 +1,276 @@ +{ + "Customer": [ + { + "Id": 57284, + "ParentCustomerId": null, + "Name": "DUMMY 1", + "FullName": "DUMMY 1", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": null, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 0, + "PwInformDown": 0, + "PwInformAtRisk": 0, + "PwInformImPact": 0, + "PwInformNoImPact": 0, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": null, + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": null, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2016-05-18T10:20:38", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57603, + "ParentCustomerId": null, + "Name": "DUMMY 2", + "FullName": "DUMMY 2", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": null, + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": null, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57604, + "ParentCustomerId": null, + "Name": "DUMMY 3", + "FullName": "DUMMY 3", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": null, + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": null, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + } + ], + "Vendor": [ + { + "Id": 2482, + "Name": "DUMMY 4", + "TypeId": 1, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "TESTVENDORDESCRIPTION", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": null, + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-23T16:34:30", + "Errors": null, + "HasErrors": false + }, + { + "Id": 2502, + "Name": "DUMMY 5", + "TypeId": 13, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": null, + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-31T13:30:42", + "Errors": null, + "HasErrors": false + }, + { + "Id": 2503, + "Name": "DUMMY 2", + "TypeId": 14, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": null, + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-31T13:30:42", + "Errors": null, + "HasErrors": false + } + ] +} \ No newline at end of file diff --git a/test/data/ims_otrs_customers_extra.json b/test/data/ims_otrs_customers_extra.json new file mode 100644 index 0000000000000000000000000000000000000000..b8b5c94c52f83c1e315ed693958a94bc405a7b3e --- /dev/null +++ b/test/data/ims_otrs_customers_extra.json @@ -0,0 +1,1001 @@ +[ + { + "Id": 57284, + "ParentCustomerId": null, + "Name": "DUMMY 1", + "FullName": "DUMMY 1", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": null, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 0, + "PwInformDown": 0, + "PwInformAtRisk": 0, + "PwInformImPact": 0, + "PwInformNoImPact": 0, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": null, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2016-05-18T10:20:38", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57603, + "ParentCustomerId": null, + "Name": "DUMMY 2", + "FullName": "DUMMY 2", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 706, + "MainTypeId": 5, + "CustomerId": 57603, + "RelateTypeId": 2, + "ContactId": 1081, + "Contact": { + "Id": 1081, + "IsGroup": 1, + "Name": "DUMMY 2 NOC", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "BANOC@DUMMY2.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-04T10:55:58", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:03", + "Errors": null, + "HasErrors": false + }, + { + "Id": 1771, + "MainTypeId": 5, + "CustomerId": 57603, + "RelateTypeId": 2, + "ContactId": 1082, + "Contact": { + "Id": 1082, + "IsGroup": 1, + "Name": "DUMMY 2 PEERING", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "BBPEERING@DUMMY2.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-04T10:56:07", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T18:05:14", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57604, + "ParentCustomerId": null, + "Name": "DUMMY 3", + "FullName": "DUMMY 3", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57605, + "ParentCustomerId": null, + "Name": "DUMMY 4", + "FullName": "DUMMY 4", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-02-24T12:08:46", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57606, + "ParentCustomerId": null, + "Name": "DUMMY 5", + "FullName": "DUMMY 5", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 839, + "MainTypeId": 5, + "CustomerId": 57606, + "RelateTypeId": 2, + "ContactId": 1521, + "Contact": { + "Id": 1521, + "IsGroup": 1, + "Name": "DUMMY 5", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "E 1234 5678", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "ENOC@DUMMY5.NET", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:26:57", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:17", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57607, + "ParentCustomerId": null, + "Name": "DUMMY 6", + "FullName": "DUMMY 6", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 844, + "MainTypeId": 5, + "CustomerId": 57607, + "RelateTypeId": 2, + "ContactId": 1528, + "Contact": { + "Id": 1528, + "IsGroup": 1, + "Name": "DUMMY 6", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "FNOC@DUMMY6.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:26:58", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:17", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57608, + "ParentCustomerId": null, + "Name": "DUMMY 7", + "FullName": "DUMMY 7", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 872, + "MainTypeId": 5, + "CustomerId": 57608, + "RelateTypeId": 2, + "ContactId": 1598, + "Contact": { + "Id": 1598, + "IsGroup": 0, + "Name": "DUMMY 7", + "InFix": "", + "LastName": "NOC", + "Gender": "", + "Phone": "G 1234 5678", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "GNOC@DUMMY7.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:27:00", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:20", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57609, + "ParentCustomerId": null, + "Name": "DUMMY 8", + "FullName": "DUMMY 8", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 944, + "MainTypeId": 5, + "CustomerId": 57609, + "RelateTypeId": 2, + "ContactId": 1997, + "Contact": { + "Id": 1997, + "IsGroup": 1, + "Name": "H D_FIRST", + "InFix": "H D_INFIX", + "LastName": "H D_LAST", + "Gender": "H GENDER", + "Phone": "H 1234 5678", + "Mobile": "H 2345 6789", + "Fax": "H FAX NUMBER", + "Webpage": "H WEB", + "Mail": "HNOC@DUMMY8.COM", + "PlannedworkMail": "H PLANNED WORK MAIL", + "TroubleticketMail": "H TROUBLE TICKET MAIL", + "JobTitle": "H JOB TITLE", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "H LANG", + "PreFix": "H PREFIX", + "SmsQuery": "H SMS", + "ExtraInfo": "H EXTRA", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:27:14", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:28", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 3, + "Name": "EU NREN", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57610, + "ParentCustomerId": null, + "Name": "DUMMY 9", + "FullName": "DUMMY 9", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 1274, + "MainTypeId": 5, + "CustomerId": 57610, + "RelateTypeId": 2, + "ContactId": 2069, + "Contact": { + "Id": 2069, + "IsGroup": 1, + "Name": "DUMMY 9", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "IAF_NAME.L_NAME@DUMMY9.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:27:17", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:04:02", + "Errors": null, + "HasErrors": false + }, + { + "Id": 1275, + "MainTypeId": 5, + "CustomerId": 57610, + "RelateTypeId": 2, + "ContactId": 2070, + "Contact": { + "Id": 2070, + "IsGroup": 1, + "Name": "DUMMY 9 NOC", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "I 2345 6789", + "Fax": "", + "Webpage": "", + "Mail": "IBNOC@DUMMY9.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:27:17", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:04:02", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + }, + { + "Id": 57611, + "ParentCustomerId": null, + "Name": "DUMMY 10", + "FullName": "DUMMY 10", + "Number": null, + "Address": "", + "PhoneNumber": "", + "FaxNumber": "", + "AccountManager": "", + "AccountEmail": "", + "Code": "", + "SlaId": null, + "ServiceCenter": 0, + "ServiceCenterName": "", + "Website": "", + "CustomerTypeId": 1, + "PwCodeBlue": 0, + "PwInformProtectionSwitch": 1, + "PwInformDown": 1, + "PwInformAtRisk": 1, + "PwInformImPact": 1, + "PwInformNoImPact": 1, + "PwExtraInfo": "", + "PwLanguage": "", + "CountryId": null, + "Sla": null, + "Sites": null, + "Nodes": null, + "Racks": null, + "Orders": null, + "PwInformedList": null, + "Circuits": null, + "OloCircuits": null, + "ChannelReservations": null, + "PortReservations": null, + "IpRanges": null, + "NumberManagementList": null, + "CustomerRelatedContacts": [ + { + "Id": 1154, + "MainTypeId": 5, + "CustomerId": 57611, + "RelateTypeId": 2, + "ContactId": 2408, + "Contact": { + "Id": 2408, + "IsGroup": 1, + "Name": "DUMMY 10", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "JNOC@DUMMY10.TV", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": [], + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": null, + "QueueContacts": null, + "RowVersion": "2020-03-03T19:27:29", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T13:03:50", + "Errors": null, + "HasErrors": false + } + ], + "CustomerRelatedContracts": null, + "InNumbers": null, + "ManagementSystems": null, + "CustomerType": { + "Id": 1, + "Name": "COMMERCIAL PEER", + "Customers": [], + "RowVersion": "2020-01-31T13:26:02", + "Errors": null, + "HasErrors": false + }, + "ContractCustomerRelations": null, + "ParentCustomer": null, + "SubCustomers": null, + "EsimProfiles": null, + "Esims": null, + "Country": null, + "PwEmailSetups": null, + "TelephoneNumbers": null, + "TelephoneNumberRanges": null, + "RowVersion": "2020-01-31T13:35:07", + "Errors": null, + "HasErrors": false + } +] \ No newline at end of file diff --git a/test/data/ims_otrs_vendor_contact_extra.json b/test/data/ims_otrs_vendor_contact_extra.json new file mode 100644 index 0000000000000000000000000000000000000000..9d052833a6b198e76a1335768a65413b1367f68e --- /dev/null +++ b/test/data/ims_otrs_vendor_contact_extra.json @@ -0,0 +1,227 @@ +[ + { + "Id": 1288, + "MainTypeId": 1, + "VendorId": 2584, + "RelateTypeId": 2, + "ContactId": 1085, + "Vendor": { + "Id": 2584, + "Name": "DUMMY 10", + "TypeId": 1, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": [], + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-31T17:18:22", + "Errors": null, + "HasErrors": false + }, + "Contact": { + "Id": 1085, + "IsGroup": 0, + "Name": "K D_FIRST", + "InFix": "K D_INFIX", + "LastName": "K D_LAST", + "Gender": "K GENDER", + "Phone": "K PHONE", + "Mobile": "K MOBILE", + "Fax": "K FAX", + "Webpage": "K WEB", + "Mail": "K@DUMMY10.FR", + "PlannedworkMail": "K PLANNED MAIL", + "TroubleticketMail": "K TT MAIL", + "JobTitle": "K JOB", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "K LANG", + "PreFix": "K PREFIX", + "SmsQuery": "K SMS", + "ExtraInfo": "K EXTRA", + "CustomerRelatedContacts": null, + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": [], + "QueueContacts": null, + "RowVersion": "2020-03-03T19:26:42", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T16:33:09", + "Errors": null, + "HasErrors": false + }, + { + "Id": 1289, + "MainTypeId": 1, + "VendorId": 2584, + "RelateTypeId": 2, + "ContactId": 1092, + "Vendor": { + "Id": 2584, + "Name": "DUMMY 11", + "TypeId": 1, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": [], + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-31T17:18:22", + "Errors": null, + "HasErrors": false + }, + "Contact": { + "Id": 1092, + "IsGroup": 1, + "Name": "L DUMMY FIRST", + "InFix": "", + "LastName": "-", + "Gender": "", + "Phone": "", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "L_DUMMY@DUMM11.COM", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": null, + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": [], + "QueueContacts": null, + "RowVersion": "2020-03-03T19:26:43", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T16:33:09", + "Errors": null, + "HasErrors": false + }, + { + "Id": 1290, + "MainTypeId": 1, + "VendorId": 2584, + "RelateTypeId": 2, + "ContactId": 1093, + "Vendor": { + "Id": 2584, + "Name": "DUMMY 12", + "TypeId": 1, + "SlaOnSiteId": null, + "SlaMainTimeToRepairId": null, + "SlaLink": "", + "SlaDescription": "", + "Description": "", + "SpareOwner": "", + "StockLocation": "", + "StockContact": "", + "InternetAddress": "", + "MasterAccount": "", + "EscalationDescription": "", + "Color": "", + "IssuerCodeEsim": null, + "MnoCode": "", + "EumId": "", + "EquipmentDefinitions": null, + "ManagementSystems": null, + "CardCodes": null, + "CardDefinitions": null, + "CableTypes": null, + "VendorRelatedContacts": [], + "VendorMaterialTypes": null, + "Contract": null, + "SlaOnSite": null, + "SlaMainTimeToRepair": null, + "Type": null, + "RowVersion": "2020-01-31T17:18:22", + "Errors": null, + "HasErrors": false + }, + "Contact": { + "Id": 1093, + "IsGroup": 1, + "Name": "M FIRST", + "InFix": "", + "LastName": "M LAST", + "Gender": "", + "Phone": "M PHONE", + "Mobile": "", + "Fax": "", + "Webpage": "", + "Mail": "M@DUMMY12.DE", + "PlannedworkMail": "", + "TroubleticketMail": "", + "JobTitle": "", + "Priority": null, + "PlannedWorkMailType": null, + "Language": "", + "PreFix": "", + "SmsQuery": "", + "ExtraInfo": "", + "CustomerRelatedContacts": null, + "ContactRelatedContacts": null, + "MainContactRelatedContacts": null, + "SiteRelatedContacts": null, + "VendorRelatedContacts": [], + "QueueContacts": null, + "RowVersion": "2020-03-03T19:26:43", + "Errors": null, + "HasErrors": false + }, + "RowVersion": "2020-03-04T16:33:09", + "Errors": null, + "HasErrors": false + } +] \ No newline at end of file diff --git a/test/data/ims_pop_info_mx1_pra_cz.json b/test/data/ims_pop_info_mx1_pra_cz.json new file mode 100644 index 0000000000000000000000000000000000000000..73f4ef20cb8d6521b51fa680e2c54018e094f7ee --- /dev/null +++ b/test/data/ims_pop_info_mx1_pra_cz.json @@ -0,0 +1,213 @@ +{ + "router": { + "Id": 129078, + "Name": "MX1.PRA.CZ", + "EquipmentDefinitionId": 6959, + "InventoryStatusId": 3, + "SiteId": 445312, + "RingId": 4230, + "ManagementSystemId": 2356, + "NetworkAddress": "", + "CustomerId": 57640, + "NetworkRole": "", + "DomainId": 2686, + "ParentNodeId": null, + "Requestor": "", + "OrderId": null, + "BuildDate": "2020-02-12T09:06:10", + "InServiceDate": "2020-02-20T20:11:32", + "OutOfServiceDate": null, + "PlMiDate": null, + "CreateUserId": 6727, + "Configuration": "", + "PlOosDate": null, + "HardwareRevision": "REV 01", + "HardwareBuildNumber": null, + "SoftwareVersion": "17.4R2-S6", + "SerialNumber": "JN11F16CBAFA", + "ServiceContract": "", + "ExtraInfoImportant": 0, + "ExtraInfo": "", + "RackId": 113098, + "RackFrameId": null, + "HeightInRack": null, + "LeftInRack": 0, + "RackSide": null, + "Ups": null, + "UpsInfo": "", + "Sla": "", + "DirectionAngle": null, + "Range": null, + "Angle": null, + "StockItemId": null, + "PowerConsume": 0, + "MplsProt": "", + "FuseConsumption": null, + "Variant": "", + "RateVolume": null, + "RateBatteryBackup": null, + "RateDieselGeneratorBackup": null, + "ShouldNotBeRatedVolume": null, + "ShouldNotBeRatedAcPower": null, + "ShouldNotBeRatedDcPower": null, + "ShouldNotBeRatedDiesel": null, + "BatteryBackupHoursOrdered": null, + "DcPowerConsumption": null, + "AcPowerConsumption": null, + "HeatEmission": null, + "IpAddress": "", + "Domain": null, + "IpRelates": null, + "EquipmentDefinition": null, + "Customer": null, + "ManagementSystem": null, + "Site": null, + "Rack": null, + "RackFrame": null, + "Order": null, + "Ring": null, + "NodeAliases": null, + "StockItem": null, + "Shelves": null, + "Cards": null, + "Ports": null, + "InternalPorts": null, + "NodeCounts": null, + "RelatedOrders": null, + "NodeAttachments": null, + "ReconcileNodes": null, + "BridgeDomains": null, + "NetworkMapNodeObject": null, + "Sectors": null, + "SystemAccountNodeRelations": null, + "ParentNode": null, + "CreateUser": null, + "VmPortRelateList": null, + "VmInternalPortRelateList": null, + "SubNodeList": null, + "RowVersion": "2020-04-20T20:49:40", + "Errors": null, + "HasErrors": false + }, + "site": { + "$id": "2", + "Id": 445312, + "Name": "PRAGUE", + "SiteTypeId": 52, + "Street": "ZIKOVA, PRAHA 6", + "HouseNumber": "1905/4", + "Zipcode": "160 00", + "CityId": 102596, + "CustomerId": 57640, + "InventoryStatusId": 3, + "ParentSiteId": null, + "SiteName": "", + "BuildingName": "", + "Room": "", + "Floor": "", + "Description": "", + "ContactPerson": "MARTIN MICHAL", + "PhoneNumber": "+420 22 435 2994", + "HelpdeskPhoneNr": "", + "IsWarehouse": 0, + "Latitude": 50.10166667, + "Longitude": 14.39166667, + "Zpos": null, + "LocationAccess": "", + "VendorId": 2657, + "SiteTemplateId": null, + "Angle": 0, + "OutOfServiceDate": null, + "CoolingUnitCapacity": null, + "EmpSecured": 0, + "MaximumWindSpeed": null, + "MeanWindSpeed": null, + "MeanWindSpeedTimeInterval": null, + "MeanWindSpeedRefElevation": null, + "TurbulenceIntensity": null, + "IceLoad": null, + "City": { + "$id": "3", + "Id": 102596, + "Name": "PRAGUE", + "Abbreviation": "PRAG", + "DefaultZipcode": "", + "CountryId": 2523, + "ProvinceId": null, + "DistrictId": null, + "AliasName": "", + "Country": { + "Id": 2523, + "Name": "CZECH REPUBLIC", + "Abbreviation": "CZ", + "ExtraInformation": "", + "CountryCodeEsim": null, + "CountryCodeTelephone": null, + "Provinces": null, + "Cities": [ + { + "$ref": "3" + } + ], + "RowVersion": "2020-01-31T13:11:50", + "Errors": null, + "HasErrors": false + }, + "Province": null, + "District": null, + "Sites": [ + { + "$ref": "2" + } + ], + "RowVersion": "2020-01-31T13:12:33", + "Errors": null, + "HasErrors": false + }, + "Customer": null, + "ParentSite": null, + "Floorplan": null, + "SiteAliases": [ + { + "$id": "4", + "Id": 3272, + "SiteId": 445312, + "AliasName": "PRA", + "Originator": "", + "Description": "", + "Site": { + "$ref": "2" + }, + "RowVersion": "2020-02-03T17:34:47", + "Errors": null, + "HasErrors": false + } + ], + "Racks": null, + "SiteRelatedContacts": null, + "SiteDomains": null, + "SiteAttachments": null, + "CircuitAs": null, + "CircuitBs": null, + "Shelves": null, + "Nodes": null, + "Ports": null, + "OldPorts": null, + "InternalPorts": null, + "DdfOdfs": null, + "IpRanges": null, + "SubSites": null, + "ReconcileSites": null, + "SiteCounts": null, + "RelatedOrders": null, + "Towers": null, + "SiteType": null, + "Slacks": null, + "Polygons": null, + "Vendor": null, + "SiteTemplate": null, + "RowVersion": "2020-02-26T15:04:45", + "Errors": null, + "HasErrors": false + } +} \ No newline at end of file diff --git a/test/test_ims.py b/test/test_ims.py new file mode 100644 index 0000000000000000000000000000000000000000..773ef0dbfbda489b15d0e52a3fc34d778d288c3c --- /dev/null +++ b/test/test_ims.py @@ -0,0 +1,147 @@ +import inventory_provider + + +class MockResponse: + def __init__(self, json_data, status_code): + self.json_data = json_data + self.status_code = status_code + + def json(self): + return self.json_data + + def raise_for_status(self): + pass + + +def test_ims_class_login(mocker): + mock_post = mocker.patch('inventory_provider.db.ims.requests.post') + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + mock_post.return_value = MockResponse("my_bearer_token", 200) + + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password') + ds.get_entity_by_id('Node', 1234) + mock_post.assert_called_once_with( + 'dummy_base/login', auth=('dummy_username', 'dummy_password')) + mock_get.assert_called_once_with( + 'dummy_base/ims/Node/1234', + headers={'Authorization': 'my_bearer_token'}, + params=None) + + +def test_ims_class_entity_by_id(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + ds.get_entity_by_id('Node', 1234) + mock_get.assert_called_once_with( + 'dummy_base/ims/Node/1234', + headers={'Authorization': 'dummy_bt'}, + params=None) + + +def test_ims_class_entity_by_name(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + ds.get_entity_by_name('Node', 'dummy_name') + mock_get.assert_called_once_with( + 'dummy_base/ims/Node/byname/dummy_name', + headers={'Authorization': 'dummy_bt'}, + params=None) + + +def test_ims_class_filtered_entities(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + list(ds.get_filtered_entities('Node', 'dummy_param=dummy value')) + mock_get.assert_called_once_with( + 'dummy_base/ims/Node/filtered/dummy_param=dummy value', + headers={'Authorization': 'dummy_bt'}, + params={ + 'paginatorStartElement': 0, + 'paginatorNumberOfElements': + inventory_provider.db.ims.IMS.NO_OF_ELEMENTS_PER_ITERATION + }) + + inventory_provider.db.ims.IMS.NO_OF_ELEMENTS_PER_ITERATION = 2 + + def side_effect(*args, **kargs): + if kargs['params']['paginatorStartElement'] == 0: + return MockResponse([1, 2], 200) + return MockResponse([3], 200) + + mock_multi_get = mocker.patch( + 'inventory_provider.db.ims.requests.get', side_effect=side_effect) + + res = list(ds.get_filtered_entities('Node', 'dummy_param=dummy value')) + mock_multi_get.assert_any_call( + 'dummy_base/ims/Node/filtered/dummy_param=dummy value', + headers={'Authorization': 'dummy_bt'}, + params={ + 'paginatorStartElement': 0, + 'paginatorNumberOfElements': 2 + }) + mock_multi_get.assert_any_call( + 'dummy_base/ims/Node/filtered/dummy_param=dummy value', + headers={'Authorization': 'dummy_bt'}, + params={ + 'paginatorStartElement': 2, + 'paginatorNumberOfElements': 2 + }) + assert mock_multi_get.call_count == 2 + assert res == [1, 2, 3] + + +def test_ims_class_get_all_entities(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + list(ds.get_all_entities('Node')) + mock_get.assert_called_once_with( + 'dummy_base/ims/Node/filtered/Id <> 0', + headers={'Authorization': 'dummy_bt'}, + params={ + 'paginatorStartElement': 0, + 'paginatorNumberOfElements': + inventory_provider.db.ims.IMS.NO_OF_ELEMENTS_PER_ITERATION + }) + + +def test_ims_class_navigation_properties(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + ds.get_entity_by_id('Node', 1234, navigation_properties=[1, 2, 3]) + mock_get.assert_called_with( + 'dummy_base/ims/Node/1234', + headers={'Authorization': 'dummy_bt'}, + params={'navigationproperty': 6}) + + +def test_ims_class_cache(mocker): + mock_get = mocker.patch('inventory_provider.db.ims.requests.get') + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password', 'dummy_bt') + + ds.get_entity_by_id( + 'Node', 4567, navigation_properties=[1, 2, 3, 4], use_cache=True) + assert mock_get.call_count == 1 + ds.get_entity_by_id( + 'Node', 4567, navigation_properties=[1, 2, 3, 4], use_cache=True) + assert mock_get.call_count == 1 + ds.get_entity_by_id( + 'Node', 4567, navigation_properties=[1, 2, 3, 4], use_cache=False) + assert mock_get.call_count == 2 + ds.get_entity_by_id( + 'Node', 4567, navigation_properties=[1, 2, 3, 4]) + assert mock_get.call_count == 3 + ds.get_entity_by_id( + 'Node', 4567, navigation_properties=[1, 2, 3, 4, 5], use_cache=True) + assert mock_get.call_count == 4 diff --git a/test/test_ims_data.py b/test/test_ims_data.py new file mode 100644 index 0000000000000000000000000000000000000000..4a35273d30be16470b4444587bc31ed752d6d8a5 --- /dev/null +++ b/test/test_ims_data.py @@ -0,0 +1,173 @@ +import json + +import inventory_provider +from inventory_provider.db.ims import InventoryStatus +from inventory_provider.db.ims_data import lookup_pop_info, \ + lookup_lg_routers, otrs_get_customer_company_rows, \ + otrs_get_customer_users_rows + + +def test_lookup_lg_routers(mocker): + + ims = mocker.patch('inventory_provider.db.ims.IMS') + with open('test/data/ims_lg_data.json') as data: + ims.return_value.get_filtered_entities.return_value = json.load(data) + ims.return_value.get_entity_by_id.return_value = { + 'Name': 'pop name', + 'Longitude': 'long', + 'Latitude': 'lat', + 'City': { + 'Name': 'city name', + 'Country': { + 'Name': 'country name', + 'Abbreviation': 'country code' + } + }, + 'SiteAliases': [ + { + 'AliasName': 'abbr' + } + ] + } + + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password') + + res = list(lookup_lg_routers(ds)) + + ds.get_filtered_entities.assert_called_once_with( + 'EquipmentDefinition', + 'Name like mx', + inventory_provider.db.ims.EQUIP_DEF_PROPERTIES['Nodes']) + + assert ds.get_entity_by_id.call_count == 35 + assert len(res) == 35 + + pop = { + 'name': 'pop name', + 'city': 'city name', + 'country': 'country name', + 'country code': 'country code', + 'abbreviation': 'abbr', + 'longitude': 'long', + 'latitude': 'lat' + } + assert res[0] == { + 'equipment name': 'MX3.LAB.OFFICE.GEANT.NET', + 'type': 'CORE', + 'pop': pop + } + + +def test_lookup_pop_info(mocker): + + ims = mocker.patch('inventory_provider.db.ims.IMS') + with open('test/data/ims_pop_info_mx1_pra_cz.json') as data: + resp_data = json.load(data) + ims.return_value.get_entity_by_name.return_value = resp_data['router'] + ims.return_value.get_entity_by_id.return_value = resp_data['site'] + + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password') + res = lookup_pop_info(ds, 'dummy_host') + ds.get_entity_by_name.assert_called_once_with('Node', 'dummy_host') + ds.get_entity_by_id.assert_called_once_with( + 'Site', 445312, [2, 64, 256], True) + assert res == { + 'equipment-name': 'MX1.PRA.CZ', + 'status': InventoryStatus.IN_SERVICE.name, + 'pop': { + 'name': 'PRAGUE', + 'city': 'PRAGUE', + 'country': 'CZECH REPUBLIC', + 'abbreviation': 'PRA', + 'longitude': 14.39166667, + 'latitude': 50.10166667, + } + } + + +def test_otrs_get_customer_company_rows(mocker): + ims = mocker.patch('inventory_provider.db.ims.IMS') + with open('test/data/ims_otrs_customers.json') as data: + resp_data = json.load(data) + + def se(*args, **kargs): + return resp_data[args[0]] + mocked_get_all_entities = ims.return_value.get_all_entities + mocked_get_all_entities.side_effect = se + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password') + cus_comp_rows = list(otrs_get_customer_company_rows(ds)) + assert len(cus_comp_rows) == 6 + mocked_get_all_entities.assert_any_call('Customer') + mocked_get_all_entities.assert_any_call('Vendor') + assert cus_comp_rows[0] == ['customer_id', 'name', 'street', 'zip', + 'city', 'country', 'url', 'comments'] + ids = [] + names = [] + for row in cus_comp_rows[1:]: + assert len(row) == 8 + ids.append(row[0]) + names.append(row[1]) + assert ids == ['DUMMY1', 'DUMMY2', 'DUMMY3', 'DUMMY4', 'DUMMY5'] + assert names == ['DUMMY 1', 'DUMMY 2', 'DUMMY 3', 'DUMMY 4', 'DUMMY 5'] + + +def test_otrs_get_customer_users(mocker): + ims = mocker.patch('inventory_provider.db.ims.IMS') + resp_data = {} + with open('test/data/ims_otrs_customers_extra.json') as data: + resp_data['Customer'] = json.load(data) + with open('test/data/ims_otrs_vendor_contact_extra.json') as data: + resp_data['VendorRelatedContact'] = json.load(data) + + def se(*args, **kargs): + return resp_data.get(args[0], []) + + mocked_get_all_entities = ims.return_value.get_all_entities + mocked_get_all_entities.side_effect = se + + mocked_get_all_entities = ims.return_value.get_all_entities + ds = inventory_provider.db.ims.IMS( + 'dummy_base', 'dummy_username', 'dummy_password') + + customer_users = list(otrs_get_customer_users_rows(ds)) + mocked_get_all_entities.assert_any_call('Customer', [32768, 262144]) + mocked_get_all_entities.assert_any_call('VendorRelatedContact', [8, 16]) + + assert customer_users[0] == [ + 'email', + 'username', + 'customer_id', + 'customer_id_2', + 'title', + 'firstname', + 'lastname', + 'phone', + 'fax', + 'mobile', + 'street', + 'zip', + 'city', + 'country', + 'comments' + ] + + assert len(customer_users) == 13 + assert customer_users[1] == [ + 'BANOC@DUMMY2.COM', 'BANOC@DUMMY2.COM', 'DUMMY2', '', '', + 'DUMMY 2 NOC', '-', '', '', '', + '', '', '', '', '' + ] + assert customer_users[6] == [ + 'HNOC@DUMMY8.COM', 'HNOC@DUMMY8.COM', 'DUMMY8', 'OTRS-GEANT-NREN', '', + 'H D_FIRST', 'H D_INFIX H D_LAST', '', '', '', + '', '', '', '', '' + ] + assert customer_users[10] == [ + 'K@DUMMY10.FR', 'K@DUMMY10.FR', 'DUMMY10', '', '', + 'K D_FIRST', 'K D_INFIX K D_LAST', '', '', '', + '', '', '', '', '' + ] + assert customer_users[12][6] == 'M LAST' diff --git a/test/test_ims_worker.py b/test/test_ims_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..136f37a82895795b753c03417b3528eb0677e5b7 --- /dev/null +++ b/test/test_ims_worker.py @@ -0,0 +1,44 @@ +import os +import re + +from inventory_provider.tasks.ims_worker import export_data_for_otrs, OTRSFiles + + +def test_otrs_exports(data_config_filename, data_config, mocker): + os.environ['INVENTORY_PROVIDER_CONFIG_FILENAME'] = data_config_filename + otrs_config = data_config["otrs-export"] + mocked_writer = \ + mocker.patch('inventory_provider.tasks.ims_worker.csv.writer') + mocked_row_writer = mocked_writer.return_value.writerows + mocked_run = mocker.patch( + 'inventory_provider.tasks.ims_worker.subprocess.run') + mocker.patch( + 'inventory_provider.tasks.ims_worker.ims_data.otrs_get_customer_company_rows', # noqa + return_value=[[1, 2, 3, 4], [5, 6, 7, 8]] + ) + mocker.patch( + 'inventory_provider.tasks.ims_worker.ims_data.otrs_get_customer_users_rows', # noqa + return_value=[[9, 10, 11, 12], [13, 14, 15, 16]] + ) + + export_data_for_otrs(OTRSFiles.CUSTOMER_COMPANIES) + mocked_row_writer.assert_called_with([[1, 2, 3, 4], [5, 6, 7, 8]]) + + export_data_for_otrs(OTRSFiles.CUSTOMER_USERS) + mocked_row_writer.assert_called_with([[9, 10, 11, 12], [13, 14, 15, 16]]) + + export_data_for_otrs() + assert mocked_row_writer.call_count == 4 + + args, kwargs = mocked_run.call_args + called_with = args[0] + + t = r'^rsync -aP --rsh="ssh -l {user} -p 22 -i {key_file} -o \'UserKnownHostsFile {known_hosts}\'" /\w+/\w+/\* {destination}$' # noqa + + p = t.format( + user=otrs_config['username'], + key_file=otrs_config['private-key'], + destination=otrs_config['destination'], + known_hosts=otrs_config['known-hosts'] + ) + assert bool(re.match(p, called_with))