Skip to content

Conversation

@emonty
Copy link

@emonty emonty commented Mar 20, 2017

There are two libraries - os-client-config and shade - that already
exist for the purposes of what these utility libs are doing.

os-client-config's job is to collect client config information, whether
via environment variables, command line arguments or clouds.yaml files
and construct relevant objects from that. For instance, it will very
happily make novaclient.client.Client objects for user - and it'll
handle all of the arguments possible.

shade's job is to contain business logic. So a good amount of the API
calls in NovaClient are probably just things that need to live in shade.
That's a few more steps than this is, but since shade is also driven by
os-client-config, moving to os-client-config as a first step seems
fairly sane.

There are two libraries - os-client-config and shade - that already
exist for the purposes of what these utility libs are doing.

os-client-config's job is to collect client config information, whether
via environment variables, command line arguments or clouds.yaml files
and construct relevant objects from that. For instance, it will very
happily make novaclient.client.Client objects for user - and it'll
handle all of the arguments possible.

shade's job is to contain business logic. So a good amount of the API
calls in NovaClient are probably just things that need to live in shade.
That's a few more steps than this is, but since shade is also driven by
os-client-config, moving to os-client-config as a first step seems
fairly sane.
Copy link
Collaborator

@nishpatwa nishpatwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for submitting PR, I liked your approach :)

Couple of nits:

  • would you be able to include os_client_config in requirements.txt under antiaffinity_check tool

  • Since removing the authentication.py will influence the other tools, would you be able to keep the file for the present? I will present a fix for the other tools to utilize os_client_config once this PR is merged

I have one concern:
Can we control the version of python apis os_client_config utilize?
The explanation for this is in future we will branch this repo to the particular openstack stable release


def setup_clients(self):
"""
A method to seting up authentication and necessary clients for
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add "import os_client_config" on top?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants