openstack: drop some reference to shade (#47359)

shade is not used anymore by the `os_*` modules.

PR #40532 replaces `shade` library by `openstacksdk`. This commit clean
up some references to the old library. It's similiar to what has been
done in PR #40784.
pull/4420/head
Gonéri Le Bouder 2018-10-30 16:29:11 -04:00 committed by Alicia Cozine
parent b7e77c4274
commit 30b6bb34cd
4 changed files with 7 additions and 13 deletions

View File

@ -50,16 +50,14 @@ Libraries
* All complex cloud interaction or interoperability code should be housed in * All complex cloud interaction or interoperability code should be housed in
the [openstacksdk](http://git.openstack.org/cgit/openstack/openstacksdk) the [openstacksdk](http://git.openstack.org/cgit/openstack/openstacksdk)
library. library.
* All OpenStack API interactions should happen via shade and not via * All OpenStack API interactions should happen via the openstacksdk and not via
OpenStack Client libraries. The OpenStack Client libraries do no have end OpenStack Client libraries. The OpenStack Client libraries do no have end
users as a primary audience, they are for intra-server communication. The users as a primary audience, they are for intra-server communication.
python-openstacksdk is the future there, and shade will migrate to it when
its ready in a manner that is not noticeable to ansible users.
Testing Testing
------- -------
* Integration testing is currently done in OpenStack's CI system in * Integration testing is currently done in OpenStack's CI system in
http://git.openstack.org/cgit/openstack-infra/shade/tree/shade/tests/ansible https://git.openstack.org/cgit/openstack/openstacksdk/tree/openstack/tests/ansible
* Testing in shade produces an obvious chicken-and-egg scenario. Work is under * Testing in openstacksdk produces an obvious chicken-and-egg scenario. Work is under
way to trigger from and report on PRs directly. way to trigger from and report on PRs directly.

View File

@ -625,11 +625,7 @@ def _check_security_groups(module, cloud, server):
return changed, server return changed, server
module_security_groups = set(module.params['security_groups']) module_security_groups = set(module.params['security_groups'])
# Workaround a bug in shade <= 1.20.0 server_security_groups = set(sg.name for sg in server.security_groups)
if server.security_groups is not None:
server_security_groups = set(sg.name for sg in server.security_groups)
else:
server_security_groups = set()
add_sgs = module_security_groups - server_security_groups add_sgs = module_security_groups - server_security_groups
remove_sgs = server_security_groups - module_security_groups remove_sgs = server_security_groups - module_security_groups

View File

@ -44,7 +44,7 @@ options:
required: false required: false
requirements: requirements:
- "python >= 2.7" - "python >= 2.7"
- "shade" - "openstack"
''' '''
EXAMPLES = ''' EXAMPLES = '''

View File

@ -172,7 +172,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
else: else:
config_files = None config_files = None
# TODO(mordred) Integrate shade's logging with ansible's logging # TODO(mordred) Integrate openstack's logging with ansible's logging
sdk.enable_logging() sdk.enable_logging()
cloud_inventory = sdk_inventory.OpenStackInventory( cloud_inventory = sdk_inventory.OpenStackInventory(