diff --git a/inventory_provider/db/ims.py b/inventory_provider/db/ims.py index fd6b51dc863fab99a0d7a3efcb560dcec097c069..181cddf2c515f5685a8d62152267415ac97b1969 100644 --- a/inventory_provider/db/ims.py +++ b/inventory_provider/db/ims.py @@ -115,7 +115,7 @@ class IMS(object): auth=(username, password)) response.raise_for_status() cls.bearer_token_init_time = re_init_time - cls.bearer_token = response.json() + cls.bearer_token = response.text def _get_entity( self, @@ -156,16 +156,29 @@ class IMS(object): return False + def _convert_keys(source): + if isinstance(source, list): + return [_convert_keys(x) for x in source] + elif isinstance(source, dict): + new = {} + for k, v in source.items(): + if isinstance(v, (dict, list)): + v = _convert_keys(v) + new[k.lower()] = v + return new + return source + while True: response = requests.get( url, - headers={'Authorization': self.bearer_token}, + headers={'Authorization': f'Bearer {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() + orig = response.json() + return_value = _convert_keys(orig) if use_cache: IMS.cache[cache_key] = return_value diff --git a/inventory_provider/db/ims_data.py b/inventory_provider/db/ims_data.py index 48ab115c15711abc3b7a14659a80e3139748250f..b60116a7f21f535f4fdf95e09d82eeb505a361d6 100644 --- a/inventory_provider/db/ims_data.py +++ b/inventory_provider/db/ims_data.py @@ -122,13 +122,13 @@ def otrs_get_customer_company_rows(ds): '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'], + 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'], + if vendor['name'] not in all_cus_comps: + all_cus_comps.add(vendor['name']) + yield [vendor['name'].replace(' ', ''), vendor['name'], '', '', '', '', '', ''] @@ -142,7 +142,7 @@ def _is_valid_customer(cus): def otrs_get_customer_contacts(ds): def _get_customer_id2(t): - if t['Id'] == 3 or t['Name'] == 'EU NREN': + if t['id'] == 3 or t['name'] == 'EU NREN': return 'OTRS-GEANT-NREN' return '' @@ -153,21 +153,21 @@ def otrs_get_customer_contacts(ds): ims.CUSTOMER_PROPERTIES['CustomerType'] ]): - if customer['CustomerRelatedContacts']: + if customer['customerrelatedcontacts']: - for contact in 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(' ', ''), + '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']), + _get_customer_id2(customer['customertype']), 'title': '', - 'firstname': contact['Contact']['Name'], + 'firstname': contact['contact']['name'], 'lastname': ' '.join(filter(None, [ - contact['Contact']['InFix'], - contact['Contact']['LastName'] + contact['contact']['infix'], + contact['contact']['lastname'] ])), 'phone': '', 'fax': '', @@ -193,16 +193,16 @@ def otrs_get_vendor_contacts(ds): 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(' ', ''), + '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'], + 'firstname': vrc['contact']['name'], 'lastname': ' '.join(filter(None, [ - vrc['Contact']['InFix'], - vrc['Contact']['LastName'] + vrc['contact']['infix'], + vrc['contact']['lastname'] ])), 'phone': '', 'fax': '', @@ -263,7 +263,6 @@ def otrs_get_customer_users_rows(ds, return_duplicates=False): if duplicate_emails: logger.info('Duplicate emails found in OTRS customer-user export: ' f'{duplicate_emails} - attempting to weed') - # weeded = [] for email in duplicate_emails: weeded = weed_duplicates(cus_by_email.pop(email)) if len(weeded) == 1: @@ -275,8 +274,6 @@ def otrs_get_customer_users_rows(ds, return_duplicates=False): ) if remaining_duplicates: - # need guidance what to do if this occurs, should we pick the first - # one for each, or ignore them completely? Ignoring them for now logger.error('Duplicate emails remain after weeding, ' f'{"including" if return_duplicates else "excluding"}' ' duplicates in returned data: ') diff --git a/setup.py b/setup.py index 35ab81204f7ec07fd64a138a6eb76ce4c95c7ed8..f2fb5ce540376e431a73c09965be67081509f106 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='inventory-provider', - version="0.44", + version="0.45", author='GEANT', author_email='swd@geant.org', description='Dashboard inventory provider', diff --git a/test/data/ims_otrs_customers.json b/test/data/ims_otrs_customers.json index c5da5600087ba4175a495f9ad802674ce684db6b..5f6053a9800e19159a505232c5622ab6bdd7461e 100644 --- a/test/data/ims_otrs_customers.json +++ b/test/data/ims_otrs_customers.json @@ -1,276 +1 @@ -{ - "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 +{"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}]} diff --git a/test/data/ims_otrs_customers_extra.json b/test/data/ims_otrs_customers_extra.json index b8b5c94c52f83c1e315ed693958a94bc405a7b3e..f10de965ac3c347a5236177691206e96d87d46e3 100644 --- a/test/data/ims_otrs_customers_extra.json +++ b/test/data/ims_otrs_customers_extra.json @@ -1,1001 +1 @@ -[ - { - "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 +[{"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 index 9d052833a6b198e76a1335768a65413b1367f68e..871c22e3c6573776d0c4c16d29f4a3c9d55e6c44 100644 --- a/test/data/ims_otrs_vendor_contact_extra.json +++ b/test/data/ims_otrs_vendor_contact_extra.json @@ -1,227 +1 @@ -[ - { - "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 +[{"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/test_ims.py b/test/test_ims.py index 773ef0dbfbda489b15d0e52a3fc34d778d288c3c..0f4ed193c21c1a5e01905906de97e5805d9bc173 100644 --- a/test/test_ims.py +++ b/test/test_ims.py @@ -17,6 +17,7 @@ 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) + mock_post.return_value.text = "my_bearer_token" ds = inventory_provider.db.ims.IMS( 'dummy_base', 'dummy_username', 'dummy_password') @@ -25,7 +26,7 @@ def test_ims_class_login(mocker): 'dummy_base/login', auth=('dummy_username', 'dummy_password')) mock_get.assert_called_once_with( 'dummy_base/ims/Node/1234', - headers={'Authorization': 'my_bearer_token'}, + headers={'Authorization': 'Bearer my_bearer_token'}, params=None) @@ -37,7 +38,7 @@ def test_ims_class_entity_by_id(mocker): ds.get_entity_by_id('Node', 1234) mock_get.assert_called_once_with( 'dummy_base/ims/Node/1234', - headers={'Authorization': 'dummy_bt'}, + headers={'Authorization': 'Bearer dummy_bt'}, params=None) @@ -49,7 +50,7 @@ def test_ims_class_entity_by_name(mocker): 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'}, + headers={'Authorization': 'Bearer dummy_bt'}, params=None) @@ -61,7 +62,7 @@ def test_ims_class_filtered_entities(mocker): 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'}, + headers={'Authorization': 'Bearer dummy_bt'}, params={ 'paginatorStartElement': 0, 'paginatorNumberOfElements': @@ -81,14 +82,14 @@ def test_ims_class_filtered_entities(mocker): 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'}, + headers={'Authorization': 'Bearer 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'}, + headers={'Authorization': 'Bearer dummy_bt'}, params={ 'paginatorStartElement': 2, 'paginatorNumberOfElements': 2 @@ -105,7 +106,7 @@ def test_ims_class_get_all_entities(mocker): list(ds.get_all_entities('Node')) mock_get.assert_called_once_with( 'dummy_base/ims/Node/filtered/Id <> 0', - headers={'Authorization': 'dummy_bt'}, + headers={'Authorization': 'Bearer dummy_bt'}, params={ 'paginatorStartElement': 0, 'paginatorNumberOfElements': @@ -121,7 +122,7 @@ def test_ims_class_navigation_properties(mocker): 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'}, + headers={'Authorization': 'Bearer dummy_bt'}, params={'navigationproperty': 6})