Integrations
ucmdb_rest.integration.Integrations(server)
Initialize the service with a reference to the main level UCMDB server
Source code in ucmdb_rest\integration.py
clear_cache(job_details)
This function clears the integration cache for a specific job (or jobs) inside a specific integration point
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job_details
|
dict
|
This is a dictionary which contains the integration point and which jobs are to be cleared. Use the getIntegrationDetails to retrieve the Integration Name and the Job names. For example: {"IntegrationName":["JobName1","JobName2"]} |
required |
Returns:
| Type | Description |
|---|---|
response
|
A Requests response containing the return status code of the clear or some text with an error message |
Source code in ucmdb_rest\integration.py
getIntegrationDetails(integrationpoint, detail=False)
Retrieves information about a specific integration point.
This function makes a GET request to the UCMDB server to retrieve information about a specific integration point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
integrationpoint
|
str
|
An integration point name to get the details from. |
required |
detail
|
bool
|
This returns either verbose or non-verbose information. Must be set to True or False. |
False
|
Returns:
| Type | Description |
|---|---|
Response
|
A dictionary object containing the details of a specific integration point. Example (with true details): { "adapterCategory": "", "allProperties": {}, "federationConfig": { "supportedCITs": [], "supportedAttributesForClasses": {}, "selectedCITs": {}, "selectedAttributesForClasses": {} }, "populationConfig": { "supportedQueries": [], "supportedQueriesTree": { "name": "Root", "path": null, "children": [], "query": false, "folder": true }, "jobs": [], "populationUsesQueries": true, "hasToHaveJob": false, "allowJob": false }, "dataPushConfig": { "supportedQueries": [], "jobs": [] }, "supportChanges": false, "federationSupported": false, "populationSupported": false, "dataPushSupported": false, "remoteDeploySupported": false, "createMapforceFilesSupported": false, "resourcesLocator": false, "populationResourcesLocator": false, "pushResourcesLocator": false, "supportRepopulate": false, "selectedCIId": null, "dataStoreAdapterWrapper": { "adapterName": "ApiAdapter", "displayName": "UCMDB API Population", "description": "Allows defining Reconciliation Priority for API Data In flows", "category": "", "docName": "", "protocols": [], "supportChanges": false, "federationSupported": false, "populationSupported": false, "dataPushSupported": false, "remoteDeploySupported": false, "createMapforceFilesSupported": false, "resourcesLocator": false, "populationResourcesLocator": false, "pushResourcesLocator": false, "supportRepopulate": false, "isBaseOnTriggerCI": false, "allAdaptersProperties": {}, "tqlNodeNames": null, "tql": null, "baseOnTriggerCI": false }, "federationSelectedCIT": null, "name": "UCMDBDiscovery", "adapterName": "ApiAdapter", "description": null, "enabled": true } dict A dictionary object containing the details of a specific integration point. Example (with false details): { "status": null, "successPopulationJob": -1, "errorPopulationJob": -1, "warningPopulationJob": -1, "totalPopulationJob": -1, "successPushJob": -1, "errorPushJob": -1, "warningPushJob": -1, "totalPushJob": -1, "allFederationSelectedCITs": 0, "federationSelectedCIT": "", "dataPopulationJobs": [], "dataPushJobs": [], "operationPushBlackItem": false, "serverSide": false, "basedOnTriggerCI": false, "name": "UCMDBDiscovery", "adapterName": "ApiAdapter", "description": null, "enabled": true } |
Source code in ucmdb_rest\integration.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
getIntegrationInfo()
Retrieves information about integration points.
This function makes a GET request to the UCMDB server to retrieve information about integration points.
Returns:
| Type | Description |
|---|---|
Response
|
A dictionary object containing the details of all integration points. Example: { "HistoryDataSource": { "status": "SUCESSFULL", "successPopulationJob": 0, "errorPopulationJob": 0, "warningPopulationJob": 0, "totalPopulationJob": 0, "successPushJob": 0, "errorPushJob": 0, "warningPushJob": 0, "totalPushJob": 0, "allFederationSelectedCITs": 4, "federationSelectedCIT": null, "dataPopulationJobs": [], "dataPushJobs": [], "operationPushBlackItem": false, "serverSide": true, "basedOnTriggerCI": false, "name": "HistoryDataSource", "adapterName": "CmdbHistoryAdapter", "description": "", "enabled": true }, "UCMDBDiscovery": { "status": "SUCESSFULL", "successPopulationJob": 0, "errorPopulationJob": 0, "warningPopulationJob": 0, "totalPopulationJob": 0, "successPushJob": 0, "errorPushJob": 0, "warningPushJob": 0, "totalPushJob": 0, "allFederationSelectedCITs": 0, "federationSelectedCIT": null, "dataPopulationJobs": [], "dataPushJobs": [], "operationPushBlackItem": false, "serverSide": true, "basedOnTriggerCI": false, "name": "UCMDBDiscovery", "adapterName": "ApiAdapter", "description": "", "enabled": true } } |
Source code in ucmdb_rest\integration.py
setEnabledState(integration_id, enabled=True)
This method will either enable or disable a given integration point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
integration_id
|
str
|
An integration point name. |
required |
enabled
|
bool
|
This is to enable (True) or Disable (False) the integration point. |
True
|
Returns:
| Type | Description |
|---|---|
Response
|
A dictionary object containing the details of a specific integration point. for Example: { "errorCode": 200, "errorSource": null, "message": { "code": 2200, "parameter": null, "description": null, "errorParametersValues": [ "Test_Excel_import" ], "errorMap": null, "parametrizedError": true }, "details": null, "recommendedActions": null, "nestedErrors": null, "data": null } |
Source code in ucmdb_rest\integration.py
syncIntegrationPointJob(integration_id, job_id, operationtype='population_full')
This function will run a synchronization of a current job under an integration point. It can run population_full, population_delta, push_full or push_delta
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
integration_id
|
str
|
An integration point name. |
required |
job_id
|
str
|
The name of the job to run the action on |
required |
operationtype
|
str
|
The operations, restricted to this list: population_full, population_delta, push_full or push_delta |
'population_full'
|
Returns:
| Type | Description |
|---|---|
Response
|
A dictionary object containing the results of the operation on the job inside the integration point. For Example: { "errorCode": 200, "errorSource": null, "message": { "code": 13200, "parameter": null, "description": null, "errorParametersValues": [ "POPULATION_DELTA" ], "errorMap": null, "parametrizedError": true }, "details": null, "recommendedActions": null, "nestedErrors": null, "data": null } |