Previously, resource managers were overriding __init__, list, and create
to include extra parameters, e.g., region_id. This slightly alters the
base CRUDClient to accept extra request keyword arguments to merge into
each request's arguments.
Change-Id: Ia850417c7a94eea95d35c8a93141c70945d1a800
Minimalistic though they might be, it makes sense to test everything we
can think of, including these two classes in cratonclient.v1.regions.
If we build up our testing from first principles there are things we
don't need to test about these classes. For example, we've already
written a number of tests around both cratonclient.crud.CRUDManager and
cratonclient.crud.Resource so those tests need not be duplicated here.
Change-Id: Ia5c0c8c55d78aa5c78e063163bc803525f96ed34
We were accidentally passing a tuple to the Inventory object. Because of
how we write our tests, we did not catch this.
Change-Id: I947c7905c73017cff5860c869347aaaaa7e518d6
This adds unit-only testing for the CRUDManager and Resource classes in
cratonclient.crud to solidify our testing posture in cratonclient.
In the process of writing these tests, I also identified and fixed a
couple tiny bugs introduced by copying the crud module over from
keystoneclient.
Change-Id: I85103fae92f6135facee39c1bf7afb11e8ca1030
When I originally added support for using Keystone for authenticating to
Craton, I made a mistake in setting a keyword argument of
"service_type". The correct way to use keystoneauth1 to filter the
endpoint by service type is to specify an endpoint filter dictionary
that specifies the service_type as "fleet_management"
Change-Id: I6dcdde351d5e2051105df904b2d936abafbcc231
As of I40d0e8b6a3260ff11c493268c8a0553eba62512b, craton will no longer
require users to specify the project id in the headers and request body.
Change-Id: Ifb253b5d1f7a5df0e66ec15f5d1b1bf57b8a937b
Depends-On: I40d0e8b6a3260ff11c493268c8a0553eba62512b
Related-Bug: 1628845
By using keystoneauth as the default transport layer for cratonclient we
can handle both the case where craton is deployed without Keystone as
well as the case where it is deployed with Keystone for identity and
authentication.
Change-Id: I69a6a742832c3571523d30a04be1cc4bd3da1e7b
Adds CLI and python host deletion functionality as well as testing.
Change-Id: I0cadd6f3681a5a09b58553aeb7ee8315e77e081f
Implements: blueprint craton-client-access-inventory (partial)
Closes-Bug: #1607851
- Fixed host-list command to require the region id.
- Fixed unit tests to use inventory API
- Fixed a spelling issue.
Change-Id: I5cd67ceca1f0b5a3c5628c42e1f7806b5eb7f3fe
Adding ability to create region in both python and CLI clients.
Adding doctests and unit tests for region creation.
Change-Id: I59bcf4e727d3fd7ed6d55a58560fcf48eed8cb3d
Implements: blueprint craton-client-access-inventory (partial)
Closes-Bug: #1611418
Adding ability to create a host in both python and cli clients
Adding unit tests for verifying error message on incorrect args
and verifying host created.
Implements: blueprint craton-client-access-inventory (partial)
Closes-Bug: #1607843
Change-Id: I61dbe53392a4f3c00ad50eec774e8844cd2c864d
Inventory will be access point for all sub entities to create an
intuitive API for python developers to use when trying to access
inventory entities (cells, hosts, etc).
Change-Id: Icea217103c735ad53f029dac9cfd405281a1a715
Remove old and unused constraints environments from tox.ini. Those
have never been used. Use standard environments as default list.
Note that the repo has in the past not used constraints in OpenStack
CI, this change keeps the status quo.
For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html
Change-Id: I9a5a595cffe5d975fc3b0ef4a9478adff68c9cd4
Added hosts_shell, tests_hosts_shell, and common package for cliutils
to support handling hosts-list sub command with no arguments. In parallel,
the ability to handle subcommand parsing was implemented in a basic form
in order to implement and test "craton host-list" with no additional args.
Added optional arguments to craton shell and accompanying unit tests for username, password, and url to enable creating a session and instantiate the client properly to enable other unit tests without hardcoding dummy values.
Change-Id: I05a42a06e0436e7a0de6b898d4d6e50168e6dd36