From 4bbd03210f82d8f9a89627e08a546ba9841ff7fb Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 8 Aug 2014 17:38:44 -0500 Subject: 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 --- openstackclient/shell.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'openstackclient/shell.py') 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() -- cgit v1.2.1