Created
July 20, 2016 19:53
-
-
Save Krenair/16894094b7f88649a7a3cb31fde2ccd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from keystoneclient.session import Session as KeystoneSession | |
>>> from keystoneclient.auth.identity.v2 import Password as KeystonePassword | |
>>> import designateclient.v2.client as designateclient | |
>>> | |
>>> import yaml | |
>>> config = yaml.safe_load(open('config.yaml')) | |
>>> | |
>>> keystone_session = KeystoneSession(auth=KeystonePassword( | |
... auth_url=config['nova_api_url'], | |
... username=config['username'], | |
... password=config['password'], | |
... tenant_name='our-tenant-name' | |
... )) | |
>>> designate_client = designateclient.Client(session=keystone_session) | |
>>> res = designate_client.recordsets.create('fe912603-46f8-416d-9402-a5c87a6b4138', '129', 'PTR', ["our.domain.org"], description="Manually created by Alex for testing") | |
No handlers could be found for logger "keystoneclient.session" | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python2.7/dist-packages/designateclient/v2/recordsets.py", line 66, in create | |
return self._post(url, data=data) | |
File "/usr/lib/python2.7/dist-packages/designateclient/client.py", line 53, in _post | |
resp, body = self.client.session.post(url, **kwargs) | |
File "/usr/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 176, in post | |
return self.request(url, 'POST', **kwargs) | |
File "/usr/lib/python2.7/dist-packages/designateclient/v2/client.py", line 68, in request | |
raise exceptions.Unknown(**response_payload) | |
designateclient.exceptions.Unknown: Unknown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment