Scroll to navigation

PYTHON-MAGNUMCLIENT(1) python-magnumclient PYTHON-MAGNUMCLIENT(1)

NAME

python-magnumclient - python-magnumclient 3.6.0

CONTENTS

Introduction

Team and repository tags

.SS Python bindings to the Magnum API Latest VersionDownloads

This is a client library for Magnum built on the Magnum API. It provides a Python API (the magnumclient module) and a command-line tool (magnum).

Development takes place via the usual OpenStack processes as outlined in the developer guide.

  • License: Apache License, Version 2.0
  • PyPi - package installation
  • Online Documentation
  • Storyboard project - story and task management
  • Bugs - issue tracking
  • Source

Installation

At the command line:

$ pip install python-magnumclient


Or, if you have virtualenvwrapper installed:

$ mkvirtualenv python-magnumclient
$ pip install python-magnumclient


Python bindings to the OpenStack Magnum API

This is a client for the OpenStack Magnum API. It includes a Python API (the magnumclient module) and a command-line script (installed as magnum).

Python API

To use python-magnumclient in a project, create a client instance using the keystoneauth session API:

from keystoneauth1.identity import v3
from keystoneauth1 import session
from keystoneclient.v3 import client
from magnumclient.client import Client
magnum_endpoint = "http://magnum.example.com:9511/v1"
auth = v3.Password(auth_url='http://my.keystone.com:5000/v3',

username='myuser',
password='mypassword',
project_name='myproject',
user_domain_id='default',
project_domain_id='default') sess = session.Session(auth=auth) magnum = Client('1', endpoint_override=magnum_endpoint, session=sess) magnum.clusters.list()


For more information on keystoneauth API, see Using Sessions.

Command-line tool

In order to use the CLI, you must provide your OpenStack username, password, project name, user domain ID, project domain ID, and auth endpoint. Use the corresponding configuration options (--os-username, --os-password, --os-project-name, --os-project-domain-id, --os-user-domain-id, and --os-auth-url) or set them in environment variables:

export OS_USERNAME=myuser
export OS_PASSWORD=mypassword
export OS_PROJECT_NAME=myproject
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_DOMAIN_ID=default
export OS_AUTH_URL=http://my.keystone.com:5000/v3


From there, all shell commands take the form:

magnum <command> [arguments...]


Run magnum help to see a complete listing of available commands. Run magnum help <command> to get detailed help for that command.

Contributing

If you would like to contribute to the development of OpenStack, you must follow the steps in this page:


Once those steps have been completed, changes to OpenStack should be submitted for review via the Gerrit tool, following the workflow documented at:


Pull requests submitted through GitHub will be ignored.

Bugs should be filed on Storyboard, not GitHub:


INDICES AND TABLES

  • Index
  • Search Page

AUTHOR

unknown

COPYRIGHT

2022, OpenStack Foundation

June 19, 2022 3.6.0