OpenStackClient plugin library support
Go to file
Akihiro Motoki deec32d7e0 Add project lookup utils
It is not special to specify a project of a resource.
At now, find_project() is defined in OSC, but OSC plugins
would like to consume it.

The original idea is based on openstackclient.identity.common,
but the proposed version is re-implemented on top of OpenStack SDK.
sdk_connection is saved in the clientmanager in the new stype of
OpenStack SDK connection and the commit assumes it.
The feature depends on the OpenStack SDK patch which allows us
to pass domain information to find_project().

Also adds add_project_owner_option_to_parser() to add CLI options
(--project and --project-domain). It will help us make these options
consistent across OSC and OSC plugins.

Closes-Bug: #1632147
Depends-On: I60a8b3b83f6170b60d09c101b5c7035148283678
Change-Id: I8f59fa3f9b7c573485cd1572e5e9aae08f071e37
2017-12-24 19:29:10 +09:00
doc use openstackdocstheme html context 2017-06-23 14:51:31 -04:00
osc_lib Add project lookup utils 2017-12-24 19:29:10 +09:00
releasenotes Add project lookup utils 2017-12-24 19:29:10 +09:00
.coveragerc Rename to osc-lib 2016-05-12 16:06:15 -05:00
.gitignore Updates for stestr 2017-09-14 16:53:57 -05:00
.gitreview Rename to osc-lib 2016-05-12 16:06:15 -05:00
.mailmap Clean up test environment and remove unused imports. 2013-01-22 11:44:18 -06:00
.stestr.conf Updates for stestr 2017-09-14 16:53:57 -05:00
.testr.conf Begin moving bits to osc_lib 2016-05-12 16:07:24 -05:00
.zuul.yaml Make -tips job non-voting 2017-11-22 13:33:49 -06:00
HACKING.rst Update the documentation link for doc migration 2017-07-26 16:11:31 +00:00
LICENSE Remove LICENSE APPENDIX 2015-11-18 13:25:56 +09:00
README.rst update links to docs in readme 2017-06-22 15:02:02 -04:00
requirements.txt Updated from global requirements 2017-12-10 07:36:59 +00:00
setup.cfg Update the documentation link for doc migration 2017-07-26 16:11:31 +00:00
setup.py Updated from global requirements 2017-03-07 02:04:21 +00:00
test-requirements.txt Updated from global requirements 2017-11-16 11:20:44 +00:00
tox.ini Use converged SDK insead of os-client-config 2017-12-06 15:26:39 -06:00

osc-lib

Latest Version

Downloads

OpenStackClient (aka OSC) is a command-line client for OpenStack. osc-lib is a package of common support modules for writing OSC plugins.

  • PyPi - package installation
  • Online Documentation
  • Launchpad project - part of OpenStackClient
  • Bugs - issue tracking
  • Source
  • Developer - getting started as a developer
  • Contributing - contributing code
  • Testing - testing code
  • IRC: #openstack-sdks on Freenode (irc.freenode.net)
  • License: Apache 2.0

Getting Started

osc-lib can be installed from PyPI using pip:

pip install osc-lib

Transition From OpenStackclient

This library was extracted from the main OSC repo after the OSC 2.4.0 release. The following are the changes to imports that will cover the majority of transition to using osc-lib:

  • openstackclient.api.api -> osc_lib.api.api
  • openstackclient.api.auth -> osc_lib.api.auth
  • openstackclient.api.utils -> osc_lib.api.utils
  • openstackclient.common.command -> osc_lib.command.command
  • openstackclient.common.commandmanager -> osc_lib.command.commandmanager
  • openstackclient.common.exceptions -> osc_lib.exceptions
  • openstackclient.common.logs -> osc_lib.logs
  • openstackclient.common.parseractions -> osc_lib.cli.parseractions
  • openstackclient.common.session -> osc_lib.session
  • openstackclient.common.utils -> osc_lib.utils
  • openstackclient.i18n -> osc_lib.i18n
  • openstackclient.shell -> osc_lib.shell

Also, some of the test fixtures and modules may be used:

  • openstackclient.tests.fakes -> osc_lib.tests.fakes
  • openstackclient.tests.utils -> osc_lib.tests.utils