Note that I want to rename configure to setup

This commit is contained in:
Garrett Holmstrom
2016-10-14 18:43:49 -07:00
parent ac8ecb68ee
commit ccf1f8bbe4
4 changed files with 6 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2012-2015, Eucalyptus Systems, Inc.
# Copyright (c) 2012-2016 Hewlett Packard Enterprise Development LP
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
@@ -35,6 +35,7 @@ class BaseAuth(object):
self.log.level = loglevel
def configure(self):
# TODO: rename this to setup
pass
def apply_to_request(self, request, service):

View File

@@ -270,18 +270,9 @@ class BaseCommand(object):
route[key] = val
def configure(self):
import pprint
#pprint.pprint(self._cli_parser.__dict__)
#for arg in self._cli_parser.args:
for arg in self.ARGS:
pprint.pprint(arg.__dict__)
# TODO: Come up with something that can enforce arg constraints based
# on the info we can get from self._cli_parser
# TODO: rename this to setup
pass
def setup(self):
pass ## TODO
@classmethod
def run(cls):
try:

View File

@@ -127,6 +127,7 @@ class BaseRequest(BaseCommand):
self.auth.args.update(self.args)
def configure(self):
# TODO: rename this to setup
BaseCommand.configure(self)
if self.service is not None:
self.service.configure()

View File

@@ -72,6 +72,8 @@ class BaseService(RegionConfigurableMixin):
return new
def configure(self):
# TODO: rename this to setup
#
# Configure user and region before grabbing endpoint info since
# the latter may depend upon the former
self.update_config_view()