26 Commits

Author SHA1 Message Date
Michael Johnson
34292ee649 Add hacking check for line continuation backslash
This patch adds a hacking check for line continuation backslashes and fixes the occurences that existed in the code.

Change-Id: I13cd03e16698b7f1d8036815d12a665bd1156f2f
2023-02-13 21:08:15 +00:00
Michael Johnson
15a0070d96 Add Designate hacking checks to the client
This patch adds the Designate hacking checks to also run against
the Designate client code to maintain consistent style
checking across the Designate repositories.

It also resolves one style check failure.

Change-Id: I09786482b2e7fecaa3d4484c9b1a017fae04cfea
2021-11-29 21:54:22 -08:00
Michael Johnson
820f1e9af9 Remove six and update lower-constraints appdirs
This patch removes the use of "six" as the package declares only
python3 support.
It also updates the appdirs lower-constraint to 1.4.0 to support
pip. This version is available on both centos8 and focal.
It also removes the linter related packages from lower-constraints.

Change-Id: I9337f1998749bc40737f2f0e2dcc406b6f3a0ddf
2021-03-26 18:22:44 +00:00
Erik Olof Gunnar Andersson
11e7e4bbc1 Removing unused code
Change-Id: I01d39252b0be77b035bde175b4045a8cdc859f65
2019-09-16 18:50:57 -07:00
Erik Olof Gunnar Andersson
093d8d7170 Removing v1 api support
The v1 has officially been removed from Designate since
the Queens release, and was deperecated long before that.

Change-Id: Ic5b44761ff939e2b319924af87849b3a79f9cb07
2019-09-10 20:53:25 -07:00
cao.yuan
e288539298 Update json module to jsonutils
oslo project provide jsonutils, and the others use it in many place,
this PS to update the json moudule to oslo jsonutils for consistency.

Change-Id: I8cbf78b0735572f550ece31611258c3da9ae1d35
2019-02-28 10:30:22 +08:00
Stephen Finucane
6b7b018cb6 Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate the
setting from the old warnerrors one.

This involves a couple of changes to the docs to fix the now broken
build.

Change-Id: I9bee7f6f9c69a9ed7bb22325ad1a0a1316dde526
2017-04-20 13:57:16 +01:00
Clenimar Filemon
b68dca09b1 Switch to keystoneauth
This patch migrates designateclient to using keystoneauth Session
instead of deprecated keystoneclient's Session and plugins.

Also, this patch removes the old designateclient.auth module as it is
not used anywhere else in the code base and its purpose is overridden by
the fact that keystoneauth acts as an abstraction layer for
authentication (handling requests and reauthentication internally).

Change-Id: Ic3cc0fbb76977a04bab322ebcb1c818e75646772
2016-05-16 17:20:28 -03:00
Swapnil Kulkarni (coolsvap)
454533538a Update typos
Change-Id: I55a39f985fe51452ee8b892fff10787dddc7c837
2016-01-13 11:31:31 +05:30
Jenkins
9803b87a31 Merge "Implement socket timeout in v1" 2015-09-08 13:40:16 +00:00
Federico Ceratto
2ec96b6672 Implement socket timeout in v1
Add endpoint_override keyword to v2.Client() and check for the
session argument in DesignateAdapter()
Add unit test, fix minor typos

Change-Id: I038ec7b0d1feadc9642bd47285e397b3fe84c13c
Closes-Bug: 1469739
2015-08-11 18:36:56 +02:00
Pradeep Kumar Singh
53f3ddcb01 Convert byte to str for py3 compatibilty
Change-Id: I5d65508e659aa16ba0704bf1ee7d3d66a8a2d437
2015-08-04 18:32:39 +09:00
Pradeep Kumar Singh
28715147df Solve some py3 compatibilty issues
1. replaced dict.keys() with six.iterkeys(dict)
2. replaced map with six.moves.map

Change-Id: I4b80e12a4686fd6f5857c2322de13b1245e72083
2015-07-24 02:35:55 +00:00
Kiall Mac Innes
4d3cad8148 Fix backwards compat for edit_managed/all_tenants
The previous commit at [1] introduced a bug due to last
minute reordering of code, this fixes the ordering
and adds a couple of tests to verify the functionaility.

[1]: I2e3d74168976868ea1e4dd6c797f6340faa50d0f

Change-Id: Ia6f8df92b2700f63b2208290ede85f247b33bc63
2015-06-22 20:34:50 +01:00
Kiall Mac Innes
b57328dc8f Add backwards compat for edit_managed/all_tenants
edit_managed/all_tenants were moved from get_session
to the Client constructor, we should support both
for a period of time.

Change-Id: I2e3d74168976868ea1e4dd6c797f6340faa50d0f
2015-06-19 10:09:22 +01:00
Davide Guerri
34d14b06d9 Move all_tenants and edit_managed attributes to designate Client
Initializing designate client with a pre-existing keystone session
won't work as designate expects keystone session to have the
'all_tenants' and 'edit_managed' attributes:

Example code:

    keystone_session = ksc_session.Session(
      auth=keystone_auth,
      verify=True,
      cert=my_cert
    )

than later:

    self._designate_client = designate_client(
      session=keystone_session,
      region_name=region_name
    )

with that code, wrap_api_call() will raise an exception:

  AttributeError: 'Session' object has no attribute 'all_tenants'

Same goes for 'edit_managed'.

This patch moves both attributes from Keystone session to designate
Client.

Closes-Bug: 1457821
Change-Id: I13d6c9ed46406fefc8cfa5de46811e4be009f1af
2015-05-22 13:40:52 +00:00
Jenkins
af7bdadf43 Merge "Add --edit-managed flag to cli" 2015-05-11 21:11:30 +00:00
Graham Hayes
7b865686ee Add --edit-managed flag to cli
Allows users with the right role to edit managed records

Change-Id: I5502da0ca1f04e428b2723038d369d317338ce51
2015-05-06 17:13:49 +01:00
Cedric Brandily
4f586cb060 Allow to use domain names instead of ids
Currently designate allows to identify a resource only by its id. This
change allows to identify domains by name or id. This change defines
the method find_resourceid_by_name_or_id which could be reused to
identify other resources by name or id.

Change-Id: I8e64cdbc5572623d05781d0c4e735ff0c429ea91
Closes-Bug: #1443858
2015-04-14 15:52:34 +00:00
Satyanarayana Patibandla
debf39a629 Added extra previllege to list all domains from all tenants
The user has to use the command "designate --all-tenants domain-list" to list all domains from all tenants.
When the above command is used "X-Auth-All-Projects" value is set to true and it is passed as a header to
designate.This will allow us to list all domains from all tenants.

Change-Id: I4cd4dd5427f5f35cdec95dbdf36c7386b60a2949
Fixes: bug #1418156
2015-02-24 12:44:24 +05:30
Kiall Mac Innes
7363e3b4e9 Refactor KS session creation and support CA certs
Change-Id: Ib3fc33b1825b16cc4537d979d5ab5ed0b39633d5
2014-11-26 23:07:38 +00:00
Endre Karlson
5b81006c54 Use keystone sessions for v1 client
This removes the code for checking if the service catalog has a version part in
the url or not aka /v1 and removing it as it's handled by the underlying
ksclient code in sessions. It also removes old authentication code.

Change-Id: I04109a935d7d94518c7dab05122a64ef37190d44
2014-10-23 16:37:57 +02:00
Kiall Mac Innes
11425c0d01 Support Keystone V3 authentication
We now defer the majority of our auth to keystoneclient, rather
than continuing to maintain our custom code.

Change-Id: Ia8409940d3941bc82a8b54ec60e82efa6d043102
Closes-Bug: 1323435
2014-07-07 22:44:36 +02:00
Jordan Cazamias
9d4544fd51 Update hacking package, fix/ignore new style errors
Change-Id: I49d26c3a9772c409b038b06e8256fb5823169c50
Implements: blueprint update-hacking
2014-07-01 17:14:26 -05:00
Dirk Mueller
109ea08546 Fix and enable gating on H306
H306, module imports should be in alphabetical order
This hacking check actually improves readability quite
a bit, as module imports can be sorted in groups (python stdlibs,
external imports, in-module imports)

Change-Id: I11dc9155fbfc84389f2a5956f393f705388f83ba
2013-12-16 15:41:51 +01:00
Kiall Mac Innes
67c14f0573 Rename Moniker -> Designate
Change-Id: Idf7153aa287adc874a2878dc829950fda52a4879
2013-06-09 22:08:11 +01:00