summaryrefslogtreecommitdiff
path: root/openstackclient/shell.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-08-08 17:38:44 -0500
committerDean Troyer <dtroyer@gmail.com>2014-08-25 13:38:03 -0500
commit4bbd03210f82d8f9a89627e08a546ba9841ff7fb (patch)
treea10df1f472a8b8925c778b5660115ac31c0bbc20 /openstackclient/shell.py
parent19b8605224156c48107541580a264860131b57ab (diff)
downloadpython-openstackclient-4bbd03210f82d8f9a89627e08a546ba9841ff7fb.tar.gz
Change app.restapi to app.client_manager.session
This is step 1 toward using Keystone client's session.Session as the primary session/requests interface in OSC. * Move the session create into ClientManager and rename 'restapi' attribute to 'session' * Set up ClientManager and session loggers * Fix container and object command references to restapi/api Change-Id: I013d81520b336c7a6422cd22c05d1d65655e64f8
Diffstat (limited to 'openstackclient/shell.py')
-rw-r--r--openstackclient/shell.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index 28724343..a6f508e4 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -31,7 +31,6 @@ import openstackclient
from openstackclient.common import clientmanager
from openstackclient.common import commandmanager
from openstackclient.common import exceptions as exc
-from openstackclient.common import restapi
from openstackclient.common import timing
from openstackclient.common import utils
from openstackclient.identity import client as identity_client
@@ -484,10 +483,6 @@ class OpenStackShell(app.App):
self.verify = self.options.os_cacert
else:
self.verify = not self.options.insecure
- self.restapi = restapi.RESTApi(
- verify=self.verify,
- debug=self.options.debug,
- )
def prepare_to_run_command(self, cmd):
"""Set up auth and API versions"""
@@ -498,12 +493,10 @@ class OpenStackShell(app.App):
if cmd.best_effort:
try:
self.authenticate_user()
- self.restapi.set_auth(self.client_manager.identity.auth_token)
except Exception:
pass
else:
self.authenticate_user()
- self.restapi.set_auth(self.client_manager.identity.auth_token)
return
def clean_up(self, cmd, result, err):
@@ -539,7 +532,6 @@ class OpenStackShell(app.App):
# NOTE(dtroyer): Maintain the old behaviour for interactive use as
# this path does not call prepare_to_run_command()
self.authenticate_user()
- self.restapi.set_auth(self.client_manager.identity.auth_token)
super(OpenStackShell, self).interact()