UNPKG

@itentialopensource/adapter-openstack_nova

Version:

This adapter integrates with system described as: Opensatck Compute (Nova) Service.

338 lines (323 loc) 9.97 kB
# Openstack Nova ## Table of Contents - [Specific Adapter Information](#specific-adapter-information) - [Authentication](#authentication) - [Sample Properties](#sample-properties) - [Swagger](#swagger) - [Generic Adapter Information](#generic-adapter-information) ## Specific Adapter Information ### Authentication This document will go through the steps for authenticating the OpenStack Nova adapter with Two Step Token from Keystone. Properly configuring the properties for an adapter in Itential Platform is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>. #### Two Step Token The OpenStack Nova adapter requires Authentication Token from Keystone. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository. STEPS 1. Ensure you have access to a OpenStack Nova server and that it is running 2. Follow the steps in the README.md to import the adapter into Itential Platform if you have not already done so 3. Use the properties below for the ```properties.authentication``` field ```json "authentication": { "auth_method": "request_token", "username": "<your username>", "password": "<your password>", "token_timeout": 600000, "token_cache": "local", "invalid_token_error": 401, "auth_field": "header.headers.X-Auth-Token", "auth_field_format": "{token}", "auth_logging": false, "os_user_domain_name": "Default", "os_project_name": "admin", "os_project_domain_name": "Default", "sso": { "protocol": "https", "host": "<host>", "port": 5000 }, } ``` 4. `sso` can be configured with Keystone auth data in the authentication section of the adapter config as shown above. Optionally, it can also be configured in .system/action.json. you can leave all of the other properties in the authentication section, they will not be used when the auth_method is request_token. 5. Restart the adapter. If your properties were set correctly, the adapter should go online. #### Troubleshooting - Make sure you copied over the correct credentials. - Turn on debug level logs for the adapter in Itential Platform Admin Essentials. - Turn on auth_logging for the adapter in Itential Platform Admin Essentials (adapter properties). - Investigate the logs - in particular: - The FULL REQUEST log to make sure the proper headers are being sent with the request. - The FULL BODY log to make sure the payload is accurate. - The CALL RETURN log to see what the other system is telling us. - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end. - Remember when you are done to turn auth_logging off as you do not want to log credentials. ### Sample Properties Sample Properties can be used to help you configure the adapter in the Itential Platform. You will need to update connectivity information such as the host, port, protocol and credentials. ```json "properties": { "host": "localhost", "port": 8774, "choosepath": "", "base_path": "", "version": "v2.1", "cache_location": "none", "encode_pathvars": true, "encode_queryvars": true, "save_metric": false, "stub": true, "protocol": "https", "authentication": { "auth_method": "request_token", "username": "username", "password": "password", "token": "token", "token_timeout": 600000, "token_cache": "local", "invalid_token_error": 401, "auth_field": "header.headers.X-Auth-Token", "auth_field_format": "{token}", "auth_logging": false, "client_id": "", "client_secret": "", "grant_type": "", "os_user_domain_name": "Default", "os_project_name": "admin", "os_project_domain_name": "Default", "sensitive": [], "sso": { "protocol": "https", "host": "host", "port": 5000 }, "multiStepAuthCalls": [ { "name": "", "requestFields": {}, "responseFields": {}, "successfullResponseCode": 200 } ] }, "healthcheck": { "type": "intermittent", "frequency": 600000, "query_object": {}, "addlHeaders": {} }, "throttle": { "throttle_enabled": false, "number_pronghorns": 1, "sync_async": "sync", "max_in_queue": 1000, "concurrent_max": 1, "expire_timeout": 0, "avg_runtime": 200, "priorities": [ { "value": 0, "percent": 100 } ] }, "request": { "number_redirects": 0, "number_retries": 3, "limit_retry_error": [ 0 ], "failover_codes": [], "attempt_timeout": 5000, "global_request": { "payload": {}, "uriOptions": {}, "addlHeaders": {}, "authData": {} }, "healthcheck_on_timeout": true, "return_raw": false, "archiving": false, "return_request": false }, "proxy": { "enabled": false, "host": "", "port": 1, "protocol": "http", "username": "", "password": "" }, "ssl": { "ecdhCurve": "", "enabled": false, "accept_invalid_cert": false, "ca_file": "", "ca_file_content": "", "key_file": "", "cert_file": "", "secure_protocol": "", "ciphers": "" }, "mongo": { "url": "", "host": "", "port": 0, "database": "", "dbAuth": false, "username": "", "password": "", "replSet": "", "addSrv": false, "db_ssl": { "enabled": false, "accept_invalid_cert": false, "ca_file": "", "key_file": "", "cert_file": "" } }, "devicebroker": { "enabled": false, "getDevice": [ { "path": "/not/mapped", "method": "GET", "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": { "insample": "{port}" }, "responseDatakey": "", "responseFields": { "name": "{this}{||}{that}", "ostype": "{osfield}", "ostypePrefix": "meraki-", "port": "{port}", "ipaddress": "{ip_addr}", "serial": "{serial}" } } ], "getDevicesFiltered": [ { "path": "/not/mapped", "method": "GET", "pagination": { "offsetVar": "", "limitVar": "", "incrementBy": "limit", "requestLocation": "query" }, "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": {}, "responseDatakey": "", "responseFields": { "name": "{this}{||}{that}", "ostype": "{osfield}", "ostypePrefix": "meraki-", "port": "{port}", "ipaddress": "{ip_addr}", "serial": "{serial}", "id": "{myid}" } } ], "isAlive": [ { "path": "/not/mapped/{devID}", "method": "GET", "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": { "devID": "{id}" }, "responseDatakey": "", "responseFields": { "status": "return2xx", "statusValue": "AD.200" } } ], "getConfig": [ { "path": "/not/mapped/{devID}", "method": "GET", "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": { "devID": "{id}" }, "responseDatakey": "", "responseFields": {} } ], "getCount": [ { "path": "/not/mapped", "method": "GET", "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": {}, "responseDatakey": "", "responseFields": {} } ] }, "cache": { "enabled": false, "entities": [ { "entityType": "device", "frequency": 3600, "flushOnFail": false, "limit": 10000, "retryAttempts": 5, "sort": true, "populate": [ { "path": "/not/mapped", "method": "GET", "pagination": { "offsetVar": "", "limitVar": "", "incrementBy": "limit", "requestLocation": "query" }, "query": {}, "body": {}, "headers": {}, "handleFailure": "ignore", "requestFields": {}, "responseDatakey": "", "responseFields": { "name": "{this}{||}{that}", "ostype": "{osfield}", "ostypePrefix": "meraki-", "port": "{port}", "ipaddress": "{ip_addr}", "serial": "{serial}", "id": "{myid}" } } ], "cachedTasks": [ { "name": "", "filterField": "", "filterLoc": "" } ] } ] } } ``` ### [Swagger](https://gitlab.com/itentialopensource/adapters/adapter-openstack_nova/-/blob/master/report/adapter-openapi.json) ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/adapter-openstack_nova/-/blob/master/README.md)