Change MAAS api endpoints according to v3.0.0
Signed-off-by: Ruslan Aliev <raliev@mirantis.com> Change-Id: I9daa8b5b8d76f2da939ce0dffdb3471ba7cd8947
This commit is contained in:
parent
b431f7a2cf
commit
389db640e4
2
Makefile
2
Makefile
@ -51,7 +51,7 @@ coverage_test: build_drydock
|
||||
|
||||
# Run just unit tests
|
||||
unit_tests: external_dep
|
||||
tox -re py35 $(TESTS)
|
||||
tox -re py36 $(TESTS)
|
||||
|
||||
# Run just DB integration tests
|
||||
db_integration_tests: external_dep
|
||||
|
@ -18,7 +18,7 @@ import drydock_provisioner.drivers.node.maasdriver.models.base as model_base
|
||||
|
||||
class IpRange(model_base.ResourceBase):
|
||||
|
||||
resource_url = 'iprange/{resource_id}/'
|
||||
resource_url = 'ipranges/{resource_id}/'
|
||||
fields = ['resource_id', 'comment', 'subnet', 'type', 'start_ip', 'end_ip']
|
||||
json_fields = ['comment', 'start_ip', 'end_ip']
|
||||
|
||||
|
@ -376,7 +376,7 @@ class Machine(model_base.ResourceBase):
|
||||
url = self.interpolate_url()
|
||||
|
||||
resp = self.api_client.post(
|
||||
url, op='set_owner_data', files={key: value})
|
||||
url, op='set_workload_annotations', files={key: value})
|
||||
|
||||
if resp.status_code != 200:
|
||||
self.logger.error(
|
||||
|
@ -20,7 +20,7 @@ import drydock_provisioner.drivers.node.maasdriver.models.base as model_base
|
||||
|
||||
class NodeResult(model_base.ResourceBase):
|
||||
|
||||
resource_url = 'commissioning-results/'
|
||||
resource_url = 'installation-results/'
|
||||
fields = [
|
||||
'resource_id', 'name', 'result_type', 'updated', 'data',
|
||||
'script_result'
|
||||
|
29
tox.ini
29
tox.ini
@ -1,22 +1,22 @@
|
||||
[tox]
|
||||
envlist = py35,pep8,bandit
|
||||
envlist = py36,pep8,bandit
|
||||
setupdir=python/
|
||||
|
||||
[testenv]
|
||||
setenv = YAMLDIR = {toxinidir}/python/tests/yaml_samples/
|
||||
basepython=python3
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
passenv = http_proxy,HTTP_PROXY,https_proxy,HTTPS_PROXY,no_proxy,NO_PROXY
|
||||
deps=
|
||||
-rpython/requirements-lock.txt
|
||||
-rpython/requirements-test.txt
|
||||
-r{toxinidir}/python/requirements-lock.txt
|
||||
-r{toxinidir}/python/requirements-test.txt
|
||||
|
||||
[testenv:venv]
|
||||
basepython=python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:freeze]
|
||||
basepython=python3
|
||||
recreate = True
|
||||
whitelist_externals=
|
||||
allowlist_externals=
|
||||
rm
|
||||
sh
|
||||
deps=
|
||||
@ -27,7 +27,7 @@ commands=
|
||||
|
||||
[testenv:yapf]
|
||||
basepython=python3
|
||||
whitelist_externals=find
|
||||
allowlist_externals=find
|
||||
commands=
|
||||
yapf -i -r --style=pep8 {toxinidir}/python/setup.py
|
||||
yapf -i -r --style=pep8 {toxinidir}/alembic
|
||||
@ -35,8 +35,7 @@ commands=
|
||||
yapf -i -r --style=pep8 {toxinidir}/python/tests
|
||||
find {toxinidir}/python/drydock_provisioner -name '__init__.py' -exec yapf -i --style=pep8 \{\} ;
|
||||
|
||||
[testenv:py35]
|
||||
basepython=python3
|
||||
[testenv:py36]
|
||||
usedevelop=True
|
||||
setenv=
|
||||
PYTHONWARNING=all
|
||||
@ -47,8 +46,8 @@ commands=
|
||||
{toxinidir}/python/tests/unit/{posargs}
|
||||
|
||||
[testenv:integration]
|
||||
basepython=python3.5
|
||||
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
|
||||
basepython=python3
|
||||
passenv=DOCKER_REGISTRY,IMAGE_NAME,IMAGE_PREFIX,IMAGE_TAG
|
||||
setenv=
|
||||
PYTHONWARNING=all
|
||||
YAMLDIR={toxinidir}/python/tests/yaml_samples/
|
||||
@ -60,7 +59,7 @@ commands=
|
||||
[testenv:cover]
|
||||
basepython=python3
|
||||
usedevelop=True
|
||||
passenv=DOCKER_REGISTRY IMAGE_NAME IMAGE_PREFIX IMAGE_TAG
|
||||
passenv=DOCKER_REGISTRY,IMAGE_NAME,IMAGE_PREFIX,IMAGE_TAG
|
||||
setenv=
|
||||
YAMLDIR={toxinidir}/python/tests/yaml_samples/
|
||||
commands=
|
||||
@ -70,13 +69,13 @@ commands=
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython=python3
|
||||
whitelist_externals=tee
|
||||
allowlist_externals=tee
|
||||
sh
|
||||
commands = sh -c 'oslo-config-generator --config-file=etc/drydock/drydock-config-generator.conf | tee etc/drydock/drydock.conf.sample doc/source/_static/drydock.conf.sample'
|
||||
|
||||
[testenv:genpolicy]
|
||||
basepython=python3
|
||||
whitelist_externals=tee
|
||||
allowlist_externals=tee
|
||||
sh
|
||||
commands = sh -c 'oslopolicy-sample-generator --config-file etc/drydock/drydock-policy-generator.conf | tee etc/drydock/policy.yaml.sample doc/source/_static/policy.yaml.sample'
|
||||
|
||||
@ -98,7 +97,7 @@ max-line-length=119
|
||||
basepython=python3
|
||||
deps=
|
||||
-rdoc/requirements-doc.txt
|
||||
whitelist_externals=rm
|
||||
allowlist_externals=rm
|
||||
recreate=true
|
||||
commands =
|
||||
rm -rf doc/build
|
||||
|
Loading…
x
Reference in New Issue
Block a user