Update hacking version
1. update hacking version to latest 2. fix pep8 failed Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
|
@@ -14,10 +14,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
__all__ = ['__version__']
|
|
||||||
|
|
||||||
import pbr.version
|
import pbr.version
|
||||||
|
|
||||||
|
__all__ = ['__version__']
|
||||||
|
|
||||||
version_info = pbr.version.VersionInfo('python-troveclient')
|
version_info = pbr.version.VersionInfo('python-troveclient')
|
||||||
# We have a circular import problem when we first run python setup.py sdist
|
# We have a circular import problem when we first run python setup.py sdist
|
||||||
# It's harmless, so deflect it.
|
# It's harmless, so deflect it.
|
||||||
|
@@ -21,6 +21,7 @@ Trove Command line tool
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from troveclient.compat import common
|
||||||
|
|
||||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||||
@@ -31,8 +32,6 @@ if os.path.exists(os.path.join(possible_topdir, 'troveclient',
|
|||||||
'__init__.py')):
|
'__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from troveclient.compat import common
|
|
||||||
|
|
||||||
|
|
||||||
class InstanceCommands(common.AuthedCommandsBase):
|
class InstanceCommands(common.AuthedCommandsBase):
|
||||||
"""Commands to perform various instance operations and actions."""
|
"""Commands to perform various instance operations and actions."""
|
||||||
@@ -454,8 +453,8 @@ def main():
|
|||||||
# Parse arguments
|
# Parse arguments
|
||||||
load_file = True
|
load_file = True
|
||||||
for index, arg in enumerate(sys.argv):
|
for index, arg in enumerate(sys.argv):
|
||||||
if (arg == "auth" and len(sys.argv) > (index + 1)
|
if (arg == "auth" and len(sys.argv) > (index + 1) and
|
||||||
and sys.argv[index + 1] == "login"):
|
sys.argv[index + 1] == "login"):
|
||||||
load_file = False
|
load_file = False
|
||||||
|
|
||||||
oparser = common.CliOptions.create_optparser(load_file)
|
oparser = common.CliOptions.create_optparser(load_file)
|
||||||
|
@@ -22,6 +22,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from troveclient.compat import common
|
||||||
|
|
||||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||||
@@ -32,8 +33,6 @@ if os.path.exists(os.path.join(possible_topdir, 'troveclient.compat',
|
|||||||
'__init__.py')):
|
'__init__.py')):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
from troveclient.compat import common
|
|
||||||
|
|
||||||
|
|
||||||
oparser = None
|
oparser = None
|
||||||
|
|
||||||
|
@@ -62,13 +62,13 @@ class ServiceCatalog(object):
|
|||||||
if version == 'v2':
|
if version == 'v2':
|
||||||
skip_service_type_check = True
|
skip_service_type_check = True
|
||||||
|
|
||||||
if (not skip_service_type_check
|
if (not skip_service_type_check and
|
||||||
and service.get("type") != service_type):
|
service.get("type") != service_type):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if (database_service_name and service_type in ('database',
|
if (database_service_name and service_type in ('database',
|
||||||
'databasev2')
|
'databasev2') and
|
||||||
and service.get('name') != database_service_name):
|
service.get('name') != database_service_name):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
endpoints = service['endpoints']
|
endpoints = service['endpoints']
|
||||||
|
@@ -248,8 +248,8 @@ class Backups(base.ManagerWithFind):
|
|||||||
def execution_list_generator():
|
def execution_list_generator():
|
||||||
yielded = 0
|
yielded = 0
|
||||||
for sexec in mistral_execution_generator():
|
for sexec in mistral_execution_generator():
|
||||||
if (sexec.workflow_name == cron_trigger.workflow_name
|
if (sexec.workflow_name == cron_trigger.workflow_name and
|
||||||
and ct_input == json.loads(sexec.input)):
|
ct_input == json.loads(sexec.input)):
|
||||||
yield ScheduleExecution(self, sexec.to_dict(),
|
yield ScheduleExecution(self, sexec.to_dict(),
|
||||||
loaded=True)
|
loaded=True)
|
||||||
yielded += 1
|
yielded += 1
|
||||||
|
@@ -22,6 +22,15 @@ import time
|
|||||||
|
|
||||||
from troveclient.i18n import _
|
from troveclient.i18n import _
|
||||||
|
|
||||||
|
try:
|
||||||
|
import simplejson as json
|
||||||
|
except ImportError:
|
||||||
|
import json
|
||||||
|
|
||||||
|
from troveclient import exceptions
|
||||||
|
from troveclient import utils
|
||||||
|
from troveclient.v1 import modules
|
||||||
|
|
||||||
INSTANCE_ARG_NAME = _('instance')
|
INSTANCE_ARG_NAME = _('instance')
|
||||||
INSTANCE_METAVAR = _('"opt=<value>[,opt=<value> ...] "')
|
INSTANCE_METAVAR = _('"opt=<value>[,opt=<value> ...] "')
|
||||||
INSTANCE_ERROR = _("Instance argument(s) must be of the form --instance "
|
INSTANCE_ERROR = _("Instance argument(s) must be of the form --instance "
|
||||||
@@ -53,15 +62,6 @@ EXT_PROPS_HELP = _("Add extended properties for cluster create. "
|
|||||||
" mongos_volume_size=<disk_size_in_GB>, "
|
" mongos_volume_size=<disk_size_in_GB>, "
|
||||||
" mongos_volume_type=<volume_type>.")
|
" mongos_volume_type=<volume_type>.")
|
||||||
|
|
||||||
try:
|
|
||||||
import simplejson as json
|
|
||||||
except ImportError:
|
|
||||||
import json
|
|
||||||
|
|
||||||
from troveclient import exceptions
|
|
||||||
from troveclient import utils
|
|
||||||
from troveclient.v1 import modules
|
|
||||||
|
|
||||||
|
|
||||||
def _poll_for_status(poll_fn, obj_id, action, final_ok_states,
|
def _poll_for_status(poll_fn, obj_id, action, final_ok_states,
|
||||||
poll_period=5, show_progress=True):
|
poll_period=5, show_progress=True):
|
||||||
@@ -811,8 +811,8 @@ def _strip_option(opts_str, opt_name, is_required=True,
|
|||||||
if is_required and not opt_value:
|
if is_required and not opt_value:
|
||||||
raise exceptions.MissingArgs([opt_name],
|
raise exceptions.MissingArgs([opt_name],
|
||||||
message=(_("Missing option '%s' for "
|
message=(_("Missing option '%s' for "
|
||||||
"argument --instance ")
|
"argument --instance ") +
|
||||||
+ INSTANCE_METAVAR))
|
INSTANCE_METAVAR))
|
||||||
|
|
||||||
return opt_value, opts_str.strip().strip(",")
|
return opt_value, opts_str.strip().strip(",")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user