diff --git a/muranoagent/common/config.py b/muranoagent/common/config.py index 12c1ef48..6548884a 100644 --- a/muranoagent/common/config.py +++ b/muranoagent/common/config.py @@ -82,8 +82,8 @@ def parse_args(args=None, usage=None, default_config_files=None): def setup_logging(): - """ - Sets up the logging options for a log with supplied name + """Sets up the logging options for a log with supplied name + """ if CONF.log_config: diff --git a/muranoagent/execution_plan_queue.py b/muranoagent/execution_plan_queue.py index 52767631..26577ba8 100644 --- a/muranoagent/execution_plan_queue.py +++ b/muranoagent/execution_plan_queue.py @@ -36,7 +36,7 @@ class ExecutionPlanQueue(object): def put_execution_plan(self, execution_plan): timestamp = str(int(time.time() * 10000)) - #execution_plan['_timestamp'] = timestamp + # execution_plan['_timestamp'] = timestamp folder_path = os.path.join(self._plans_folder, timestamp) os.mkdir(folder_path) file_path = os.path.join( diff --git a/muranoagent/executors/chef_puppet_executor_base.py b/muranoagent/executors/chef_puppet_executor_base.py index af75207b..3aed9fa7 100644 --- a/muranoagent/executors/chef_puppet_executor_base.py +++ b/muranoagent/executors/chef_puppet_executor_base.py @@ -31,11 +31,11 @@ class ChefPuppetExecutorBase(object): self._name = name def load(self, path, options): - """It loads the path and options from template into - the executor. + """Load the path and options from template into the executor. :param path: The path :param options: execution plan options. + """ self._path = path self._capture_stdout = options.get('captureStdout', True) diff --git a/muranoagent/files_manager.py b/muranoagent/files_manager.py index edf174e7..a793c00c 100644 --- a/muranoagent/files_manager.py +++ b/muranoagent/files_manager.py @@ -86,8 +86,10 @@ class FilesManager(object): return out_path def _download_url_file(self, file_def): - """It download the file in the murano-agent. It can proceed - from a git file or any other internal URL + """It download the file in the murano-agent. + + It can proceed from a git file or any other internal URL + """ if 'URL' not in file_def: diff --git a/muranoagent/tests/unit/test_files_manager.py b/muranoagent/tests/unit/test_files_manager.py index da2bae7d..d6646d2e 100644 --- a/muranoagent/tests/unit/test_files_manager.py +++ b/muranoagent/tests/unit/test_files_manager.py @@ -58,8 +58,8 @@ class TestFileManager(base.MuranoAgentTestCase): @mock.patch('os.makedirs') def test_execution_plan_type_downloable_git(self, mock_makedir, mock_path, mock_git): - """It tests an execution plan when there are files - which should be downloable. + """Test an execution plan with downloadable git files + """ mock_makedir.return_value = None mock_path.return_value = True @@ -76,8 +76,8 @@ class TestFileManager(base.MuranoAgentTestCase): def test_execution_plan_type_downloable(self, mock_requests, open_mock, mock_makedir, mock_mkdir, mock_path): - """It tests an execution plan when there are files - which should be downloable. + """Test an execution plan with downloadable files + """ mock_path.return_value = True mock_mkdir.return_value = None @@ -110,8 +110,8 @@ class TestFileManager(base.MuranoAgentTestCase): @mock.patch('os.path.isdir') @mock.patch('os.makedirs') def test_putfile_downloable(self, mock_makedir, path, mock_git): - """It tests the putfile method when the file is a git - URL. + """It tests the putfile method when the file is a git URL. + """ path.return_value = True mock_git.clone.return_value = None diff --git a/requirements.txt b/requirements.txt index 39edce9b..93f9e77b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,19 +1,19 @@ # 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 # process, which may cause wedges in the gate later. -pbr>=0.6,!=0.7,<1.0 +pbr<2.0,>=0.11 anyjson>=0.3.3 Babel>=1.3 -eventlet>=0.16.1,!=0.17.0 +eventlet>=0.17.4 iso8601>=0.1.9 -kombu>=2.5.0 -oslo.config>=1.9.3,<1.10.0 # Apache-2.0 +kombu>=3.0.7 +oslo.config>=1.11.0 # Apache-2.0 PyYAML>=3.1.0 six>=1.9.0 -stevedore>=1.3.0,<1.4.0 # Apache-2.0 -semantic_version>=2.3.1 +stevedore>=1.5.0 # Apache-2.0 +semantic-version>=2.3.1 +requests>=2.5.2 # not listed in global requirements bunch gitpython -requests diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 index 73637574..056c16c2 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/test-requirements.txt b/test-requirements.txt index 794e2e4b..9732aef4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,11 +1,11 @@ # 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 # process, which may cause wedges in the gate later. -hacking>=0.8.0,<0.9 +hacking<0.11,>=0.10.0 unittest2 coverage>=3.6 discover mock>=1.0 -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 -testtools>=0.9.36,!=1.2.0 +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +testtools>=1.4.0 testrepository>=0.0.18