Merge "Replace keystoneclient with keystoneauth1"
This commit is contained in:
@@ -19,7 +19,7 @@ import sys
|
||||
from cliff import command
|
||||
from cliff import lister
|
||||
from cliff import show
|
||||
from keystoneclient import exceptions
|
||||
from keystoneauth1 import exceptions
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystoneclient import adapter
|
||||
from keystoneauth1 import adapter
|
||||
|
||||
|
||||
class Client(object):
|
||||
"""Client for the Congress v1 API.
|
||||
|
||||
Example::
|
||||
import keystoneclient
|
||||
from keystoneauth1.identity import v2
|
||||
from keystoneauth1 import session
|
||||
from congressclient.v1 import client
|
||||
auth = keystoneclient.auth.identity.v2.Password(
|
||||
auth_url=AUTH_URL, username=USERNAME,
|
||||
password=PASSWORD, tenant_name=TENANT_NAME)
|
||||
session = keystoneclient.session.Session(auth=auth)
|
||||
congress = client.Client(session=session,
|
||||
auth = v2.Password(auth_url=AUTH_URL, username=USERNAME,
|
||||
password=PASSWORD, tenant_name=TENANT_NAME)
|
||||
sess = session.Session(auth=auth)
|
||||
congress = client.Client(session=sess,
|
||||
auth=None,
|
||||
interface='publicURL',
|
||||
service_type='policy',
|
||||
@@ -33,7 +33,6 @@ class Client(object):
|
||||
congress.create_policy_rule(..)
|
||||
|
||||
"""
|
||||
|
||||
policy = '/v1/policies'
|
||||
policy_path = '/v1/policies/%s'
|
||||
policy_rules = '/v1/policies/%s/rules'
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
pbr>=1.6 # Apache-2.0
|
||||
Babel>=2.3.4 # BSD
|
||||
cliff!=1.16.0,!=1.17.0,>=1.15.0 # Apache-2.0
|
||||
keystoneauth1>=2.7.0 # Apache-2.0
|
||||
oslo.i18n>=2.1.0 # Apache-2.0
|
||||
oslo.log>=1.14.0 # Apache-2.0
|
||||
oslo.serialization>=1.10.0 # Apache-2.0
|
||||
|
||||
Reference in New Issue
Block a user