Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: Ie5e5417a1d8481bb59d516a320bd7cc1dd89591e
This commit is contained in:
@@ -15,6 +15,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: merge_configs
|
module: merge_configs
|
||||||
@@ -51,20 +65,6 @@ Merge multiple configs:
|
|||||||
- "/etc/mysql/my.cnf"
|
- "/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):
|
class OverrideConfigParser(iniparser.BaseParser):
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,25 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: merge_yaml
|
module: merge_yaml
|
||||||
@@ -50,25 +69,6 @@ Merge multiple yaml files:
|
|||||||
- "/tmp/out.yml"
|
- "/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):
|
class ActionModule(action.ActionBase):
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,14 @@
|
|||||||
# This module has been relicensed from the source below:
|
# This module has been relicensed from the source below:
|
||||||
# https://github.com/SamYaple/yaodu/blob/master/ansible/library/bslurp
|
# 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 = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: bslurp
|
module: bslurp
|
||||||
@@ -107,12 +115,6 @@ permissions on dest:
|
|||||||
sha1: "{{ file_data.sha1 }}"
|
sha1: "{{ file_data.sha1 }}"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import base64
|
|
||||||
import hashlib
|
|
||||||
import os
|
|
||||||
import traceback
|
|
||||||
import zlib
|
|
||||||
|
|
||||||
|
|
||||||
def copy_from_host(module):
|
def copy_from_host(module):
|
||||||
compress = module.params.get('compress')
|
compress = module.params.get('compress')
|
||||||
@@ -187,7 +189,5 @@ def main():
|
|||||||
msg=repr(traceback.format_exc()))
|
msg=repr(traceback.format_exc()))
|
||||||
|
|
||||||
|
|
||||||
# import module snippets
|
|
||||||
from ansible.module_utils.basic import * # noqa
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -14,6 +14,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
import docker
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: kolla_container_facts
|
module: kolla_container_facts
|
||||||
@@ -49,8 +54,6 @@ EXAMPLES = '''
|
|||||||
- glance_registry
|
- glance_registry
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import docker
|
|
||||||
|
|
||||||
|
|
||||||
def get_docker_client():
|
def get_docker_client():
|
||||||
return docker.APIClient
|
return docker.APIClient
|
||||||
@@ -81,6 +84,5 @@ def main():
|
|||||||
module.exit_json(**results)
|
module.exit_json(**results)
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import * # noqa
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
import docker
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: kolla_docker
|
module: kolla_docker
|
||||||
@@ -217,13 +226,6 @@ EXAMPLES = '''
|
|||||||
image: name_of_image
|
image: name_of_image
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import shlex
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
import docker
|
|
||||||
|
|
||||||
|
|
||||||
def get_docker_client():
|
def get_docker_client():
|
||||||
return docker.APIClient
|
return docker.APIClient
|
||||||
@@ -938,7 +940,5 @@ def main():
|
|||||||
module.fail_json(changed=True, msg=repr(traceback.format_exc()),
|
module.fail_json(changed=True, msg=repr(traceback.format_exc()),
|
||||||
**dw.result)
|
**dw.result)
|
||||||
|
|
||||||
# import module snippets
|
|
||||||
from ansible.module_utils.basic import * # noqa
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -14,6 +14,12 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
import docker
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
|
||||||
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: kolla_toolbox
|
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>.*)$',
|
JSON_REG = re.compile('^(?P<host>\w+) \| (?P<status>\w+)!? =>(?P<stdout>.*)$',
|
||||||
re.MULTILINE | re.DOTALL)
|
re.MULTILINE | re.DOTALL)
|
||||||
NON_JSON_REG = re.compile(('^(?P<host>\w+) \| (?P<status>\w+)!? \| '
|
NON_JSON_REG = re.compile(('^(?P<host>\w+) \| (?P<status>\w+)!? \| '
|
||||||
@@ -158,6 +159,5 @@ def main():
|
|||||||
module.exit_json(**ret)
|
module.exit_json(**ret)
|
||||||
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import * # noqa
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ beautifulsoup4>=4.6.0 # MIT
|
|||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
doc8>=0.6.0 # Apache-2.0
|
doc8>=0.6.0 # Apache-2.0
|
||||||
extras>=1.0.0 # MIT
|
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
|
oslo.log>=3.36.0 # Apache-2.0
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
PrettyTable<0.8,>=0.7.1 # BSD
|
PrettyTable<0.8,>=0.7.1 # BSD
|
||||||
|
|||||||
Reference in New Issue
Block a user