Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ie5e5417a1d8481bb59d516a320bd7cc1dd89591e
This commit is contained in:
confi-surya 2018-12-24 12:48:56 +05:30
parent 54da9fa92c
commit b41309ef16
7 changed files with 62 additions and 60 deletions

View File

@ -15,6 +15,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import collections
import inspect
import os
import shutil
import tempfile
from ansible import constants
from ansible.plugins import action
from six import StringIO
from oslo_config import iniparser
_ORPHAN_SECTION = 'TEMPORARY_ORPHAN_VARIABLE_SECTION'
DOCUMENTATION = '''
---
module: merge_configs
@ -51,20 +65,6 @@ Merge multiple configs:
- "/etc/mysql/my.cnf"
'''
import collections
import inspect
import os
import shutil
import tempfile
from ansible import constants
from ansible.plugins import action
from six import StringIO
from oslo_config import iniparser
_ORPHAN_SECTION = 'TEMPORARY_ORPHAN_VARIABLE_SECTION'
class OverrideConfigParser(iniparser.BaseParser):

View File

@ -15,6 +15,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import inspect
import os
import shutil
import tempfile
from yaml import dump
from yaml import safe_load
try:
from yaml import CDumper as Dumper # noqa: F401
from yaml import CLoader as Loader # noqa: F401
except ImportError:
from yaml import Dumper # noqa: F401
from yaml import Loader # noqa: F401
from ansible import constants
from ansible.plugins import action
import six
DOCUMENTATION = '''
---
module: merge_yaml
@ -50,25 +69,6 @@ Merge multiple yaml files:
- "/tmp/out.yml"
'''
import inspect
import os
import shutil
import tempfile
from yaml import dump
from yaml import safe_load
try:
from yaml import CDumper as Dumper # noqa: F401
from yaml import CLoader as Loader # noqa: F401
except ImportError:
from yaml import Dumper # noqa: F401
from yaml import Loader # noqa: F401
from ansible import constants
from ansible.plugins import action
import six
class ActionModule(action.ActionBase):

View File

@ -17,6 +17,14 @@
# This module has been relicensed from the source below:
# https://github.com/SamYaple/yaodu/blob/master/ansible/library/bslurp
import base64
import hashlib
import os
import traceback
import zlib
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: bslurp
@ -107,12 +115,6 @@ permissions on dest:
sha1: "{{ file_data.sha1 }}"
'''
import base64
import hashlib
import os
import traceback
import zlib
def copy_from_host(module):
compress = module.params.get('compress')
@ -187,7 +189,5 @@ def main():
msg=repr(traceback.format_exc()))
# import module snippets
from ansible.module_utils.basic import * # noqa
if __name__ == '__main__':
main()

View File

@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import docker
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: kolla_container_facts
@ -49,8 +54,6 @@ EXAMPLES = '''
- glance_registry
'''
import docker
def get_docker_client():
return docker.APIClient
@ -81,6 +84,5 @@ def main():
module.exit_json(**results)
from ansible.module_utils.basic import * # noqa
if __name__ == "__main__":
main()

View File

@ -14,6 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import os
import shlex
import traceback
import docker
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: kolla_docker
@ -217,13 +226,6 @@ EXAMPLES = '''
image: name_of_image
'''
import json
import os
import shlex
import traceback
import docker
def get_docker_client():
return docker.APIClient
@ -938,7 +940,5 @@ def main():
module.fail_json(changed=True, msg=repr(traceback.format_exc()),
**dw.result)
# import module snippets
from ansible.module_utils.basic import * # noqa
if __name__ == '__main__':
main()

View File

@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import docker
import json
import re
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: kolla_toolbox
@ -84,11 +90,6 @@ EXAMPLES = '''
'''
import docker
import json
import re
JSON_REG = re.compile('^(?P<host>\w+) \| (?P<status>\w+)!? =>(?P<stdout>.*)$',
re.MULTILINE | re.DOTALL)
NON_JSON_REG = re.compile(('^(?P<host>\w+) \| (?P<status>\w+)!? \| '
@ -158,6 +159,5 @@ def main():
module.exit_json(**ret)
from ansible.module_utils.basic import * # noqa
if __name__ == "__main__":
main()

View File

@ -7,7 +7,7 @@ beautifulsoup4>=4.6.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
extras>=1.0.0 # MIT
hacking>=0.10.0,<1.1.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
PrettyTable<0.8,>=0.7.1 # BSD