Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cs_resourcelimit_facts module #61151

Open
wants to merge 8 commits into
base: devel
from

Conversation

@accetturi
Copy link
Contributor

commented Aug 22, 2019

SUMMARY

New module to get facts about resourcelimit in cloudstack

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

cs_resourcelimit_facts

ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

The test ansible-test sanity --test pylint [explain] failed with 161 errors:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:128:16: bad-whitespace No space allowed around keyword argument assignment         api_key = dict(default=None),                 ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:129:19: bad-whitespace No space allowed around keyword argument assignment         api_secret = dict(default=None, no_log=True),                    ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:130:16: bad-whitespace No space allowed around keyword argument assignment         api_url = dict(default=None),                 ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:131:24: bad-whitespace No space allowed around keyword argument assignment         api_http_method = dict(choices=['get', 'post'], default='get'),                         ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:132:20: bad-whitespace No space allowed around keyword argument assignment         api_timeout = dict(type='int', default=10),                     ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:133:19: bad-whitespace No space allowed around keyword argument assignment         api_region = dict(default='cloudstack'),                    ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:247:50: undefined-variable Undefined variable 'long'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:253:43: undefined-variable Undefined variable 'long'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:254:44: undefined-variable Undefined variable 'long'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:340:46: bad-whitespace Exactly one space required after comma                     for n in vpc.get('network',[]):                                               ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:390:38: bad-whitespace No space allowed after bracket                 if project.lower() in [ p['name'].lower(), p['id'] ]:                                       ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:390:67: bad-whitespace No space allowed before bracket                 if project.lower() in [ p['name'].lower(), p['id'] ]:                                                                    ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:470:33: bad-whitespace No space allowed after bracket                 if vm.lower() in [ v['name'].lower(), v['displayname'].lower(), v['id'] ]:                                  ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:470:88: bad-whitespace No space allowed before bracket                 if vm.lower() in [ v['name'].lower(), v['displayname'].lower(), v['id'] ]:                                                                                         ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:492:35: bad-whitespace No space allowed after bracket                 if zone.lower() in [ z['name'].lower(), z['id'] ]:                                    ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:492:64: bad-whitespace No space allowed before bracket                 if zone.lower() in [ z['name'].lower(), z['id'] ]:                                                                 ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:509:30: bad-whitespace No space allowed after bracket                 if os_type in [ o['description'], o['id'] ]:                               ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:509:58: bad-whitespace No space allowed before bracket                 if os_type in [ o['description'], o['id'] ]:                                                           ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:574:40: bad-whitespace No space allowed after bracket                 if d['path'].lower() in [ domain.lower(), "root/" + domain.lower(), "root" + domain.lower() ]:                                         ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:574:108: bad-whitespace No space allowed before bracket                 if d['path'].lower() in [ domain.lower(), "root/" + domain.lower(), "root" + domain.lower() ]:                                                                                                             ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:582:38: bad-whitespace Exactly one space required after comma         for tag in resource.get('tags',[]):                                       ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:592:37: bad-whitespace Exactly one space required before assignment                 args['resourceids']  = resource['id']                                      ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:594:37: bad-whitespace Exactly one space required before assignment                 args['tags']         = tags                                      ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:669:40: bad-whitespace Exactly one space required before assignment                     result_tag          = {}                                         ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:670:40: bad-whitespace Exactly one space required before assignment                     result_tag['key']   = tag['key']                                         ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:706:29: bad-whitespace Exactly one space required before assignment         args                 = {}                              ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:707:29: bad-whitespace Exactly one space required before assignment         args['account']      = self.get_account(key='name')                              ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:708:29: bad-whitespace Exactly one space required before assignment         args['domainid']     = self.get_domain(key='id')                              ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:709:29: bad-whitespace Exactly one space required before assignment         args['projectid']    = self.get_project(key='id')                              ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:726:22: bad-whitespace No space allowed around keyword argument assignment         resource_type = dict(required=True, choices=RESOURCE_TYPES.keys(), aliases=['type']),                       ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:728:15: bad-whitespace No space allowed around keyword argument assignment         domain = dict(default=None),                ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:729:16: bad-whitespace No space allowed around keyword argument assignment         account = dict(default=None),                 ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:730:16: bad-whitespace No space allowed around keyword argument assignment         project = dict(default=None),                 ^
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:744:4: redefine-in-handler Redefining name 'e' from outer scope (line 750) in exception handler
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import AVAILABLE_HASH_ALGORITHMS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import AnsibleFallbackNotFound from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import BOOLEANS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import BOOLEANS_FALSE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import BOOLEANS_TRUE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import DEFAULT_PERM from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import EXEC_PERM_BITS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import FILE_ATTRIBUTES from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import FILE_COMMON_ARGUMENTS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import HAS_SYSLOG from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import HAVE_SELINUX from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import KeysView from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import MODE_OPERATOR_RE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import Mapping from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import MutableMapping from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import MutableSequence from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import MutableSet from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import NoneType from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PASSWD_ARG_RE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PASSWORD_MATCH from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PASS_BOOLS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PASS_VARS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PERMS_RE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PERM_BITS from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PY2 from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import PY3 from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import SEQUENCETYPE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import SIZE_RANGES from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import Sequence from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import Set from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import USERS_RE from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import algorithm from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import algorithms from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import atexit from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import attribute from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import b from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import basestring from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import binary_type from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import boolean from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import bytes_to_human from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import chain from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_missing_parameters from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_mutually_exclusive from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_required_arguments from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_required_by from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_required_if from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_required_one_of from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_required_together from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_bits from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_bool from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_bytes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_dict from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_float from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_int from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_jsonarg from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_list from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_path from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_raw from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import check_type_str from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import count_terms from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import datetime from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import deque from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import e from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import env_fallback from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import errno from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import fcntl from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import format_attributes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_all_subclasses from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_bin_path from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_distribution from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_distribution_version from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_exception from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_flags_from_attributes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_module_path from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_platform from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import get_platform_subclass from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import grp from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import handle_aliases from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import has_journal from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import hashlib from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import heuristic_log_sanitize from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import human_to_bytes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import imap from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import integer_types from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import is_executable from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import journal from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import json from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import json_dict_bytes_to_unicode from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import json_dict_unicode_to_bytes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import jsonify from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import lenient_lowercase from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import list_deprecations from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import list_no_log_values from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import literal_eval from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import load_platform_subclass from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import locale from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import map from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import md5 from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import missing_required_lib from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import platform from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import pwd from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import re from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import reduce from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import remove_values from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import repeat from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import safe_eval from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import select from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import selinux from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import sha from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import shlex from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import shlex_quote from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import shutil from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import signal from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import stat from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import string_types from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import subprocess from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import sys from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import syslog from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import tempfile from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import text_type from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import to_bytes from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import to_native from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import to_text from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import traceback from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import types from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: unused-wildcard-import Unused import unicode from wildcard import
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: wildcard-import Wildcard import ansible.module_utils.basic

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test metaclass-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: __metaclass__ = type

The test ansible-test sanity --test no-dict-iteritems [explain] failed with 3 errors:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:236:37: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:656:51: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:661:63: use `dict.items` or `ansible.module_utils.six.iteritems` instead of `dict.iteritems`

The test ansible-test sanity --test pep8 [explain] failed with 104 errors:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:100:1: E303 too many blank lines (3)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:111:1: E265 block comment should start with '# '
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:123:5: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:128:16: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:128:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:129:19: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:129:21: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:130:16: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:130:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:131:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:131:26: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:132:20: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:132:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:133:19: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:133:21: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:136:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:148:19: E203 whitespace before ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:157:18: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:158:20: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:159:23: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:160:24: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:161:21: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:162:23: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:163:23: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:164:22: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:165:27: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:166:27: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:167:27: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:202:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:216:17: E123 closing bracket does not match indentation of opening bracket's line
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:222:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:229:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:230:5: E301 expected 1 blank line, found 0
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:234:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:281:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:291:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:319:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:326:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:340:47: E231 missing whitespace after ','
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:345:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:375:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:390:40: E201 whitespace after '['
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:390:67: E202 whitespace before ']'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:396:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:420:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:433:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:446:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:470:35: E201 whitespace after '['
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:470:88: E202 whitespace before ']'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:476:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:492:37: E201 whitespace after '['
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:492:64: E202 whitespace before ']'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:498:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:509:32: E201 whitespace after '['
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:509:58: E202 whitespace before ']'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:515:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:534:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:559:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:574:42: E201 whitespace after '['
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:574:108: E202 whitespace before ']'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:580:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:582:39: E231 missing whitespace after ','
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:587:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:592:36: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:594:29: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:602:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:607:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:612:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:625:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:633:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:634:5: E301 expected 1 blank line, found 0
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:638:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:652:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:669:31: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:670:38: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:675:1: E305 expected 2 blank lines after class or function definition, found 1
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:676:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:677:18: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:678:14: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:679:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:680:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:681:15: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:682:11: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:683:11: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:684:14: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:685:23: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:686:25: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:691:1: E303 too many blank lines (3)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:700:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:705:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:706:13: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:707:24: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:708:25: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:709:26: E221 multiple spaces before operator
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:717:5: E303 too many blank lines (2)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:726:22: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:726:24: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:728:15: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:728:17: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:729:16: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:729:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:730:16: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:730:18: E251 unexpected spaces around keyword / parameter equals
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:1: E305 expected 2 blank lines after class or function definition, found 1

The test ansible-test sanity --test validate-modules [explain] failed with 4 errors:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: E324 Argument 'api_http_method' in argument_spec defines default as ('get') but documentation defines default as (None)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: E324 Argument 'api_timeout' in argument_spec defines default as (10) but documentation defines default as (None)
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: E107 Imports should be directly below DOCUMENTATION/EXAMPLES/RETURN/ANSIBLE_METADATA.
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:750:0: E208 module_utils imports should import specific components, not "*"

click here for bot help

@ansibot ansibot removed the ci_verified label Aug 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:170:11: undefined-variable Undefined variable 'CloudStackException'

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test metaclass-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: __metaclass__ = type

The test ansible-test sanity --test pep8 [explain] failed with 14 errors:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:109:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:110:18: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:111:14: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:112:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:113:16: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:114:15: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:115:11: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:116:11: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:117:14: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:118:23: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:119:25: E241 multiple spaces after ':'
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:122:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:150:1: E302 expected 2 blank lines, found 1
lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:175:1: E305 expected 2 blank lines after class or function definition, found 1

click here for bot help

@ansibot ansibot added the ci_verified label Aug 22, 2019

@ansibot ansibot removed the ci_verified label Aug 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:172:11: undefined-variable Undefined variable 'CloudStackException'

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test metaclass-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: __metaclass__ = type

click here for bot help

@ansibot ansibot added the ci_verified label Aug 22, 2019

accetturi added 3 commits Aug 22, 2019

@ansibot ansibot removed the ci_verified label Aug 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

The test ansible-test sanity --test future-import-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: from __future__ import (absolute_import, division, print_function)

The test ansible-test sanity --test metaclass-boilerplate [explain] failed with 1 error:

lib/ansible/modules/cloud/cloudstack/cs_resourcelimit_facts.py:0:0: missing: __metaclass__ = type

click here for bot help

@ansibot ansibot added the ci_verified label Aug 22, 2019

@ansibot ansibot removed the ci_verified label Aug 23, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

@PatTheSilent @DazWorrall @dpassante @jeffersongirao @marcaurele @netservers @onitake @rhtyd

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016, René Moser <mail@renemoser.net>

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

you should also append you as an copyright header here

@ansibot ansibot removed the needs_triage label Aug 23, 2019

@resmo
Copy link
Member

left a comment

some minor updates needed, but overall looks good.

__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

since the is "new" the status should be "preview"


DOCUMENTATION = '''
---
module: cs_resourcelimit_facts

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

the community has decided that modules should be named "_facts" when providing host facts, otherwise the sufix should be _info. That is why this module should be renamed cs_resourcelimit_info

argument_spec = cs_argument_spec()
argument_spec.update(dict(
resource_type=dict(required=True, choices=RESOURCE_TYPES.keys(), aliases=['type']),
domain=dict(default=None),

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

not a blocker but default=None is not needed because it is already the default and can be omited.

type: instance
account: moserre
domain: customers
delegate_to: localhost

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

probably extend the examples a bit to show how to use the return

   cs_resourcelimit_facts:
     type: instance
     account: moserre
     domain: customers
   delegate_to: localhost
+  register: limit_result

+  - name: print the result
+    debug:
+      var: limit_result
DOCUMENTATION = '''
---
module: cs_resourcelimit_facts
short_description: Get facts about resource limits on Apache CloudStack based clouds.

This comment has been minimized.

Copy link
@resmo

resmo Aug 23, 2019

Member

also replace the word "facts" with "info" in the docs

@onitake

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

Maybe a stupid question, but does it make sense to have a module to only retrieve resource limits?

An admin can also set those limits, so why should the module be limited to only reading them?

cs_required_together,
)

RESOURCE_TYPES = {

This comment has been minimized.

Copy link
@PatTheSilent

PatTheSilent Aug 23, 2019

Contributor

The CloudStack API accepts a resourcetypename parameter in the listResourceLimits endpoint. You could avoid the need to maintain this mapping if you used that instead of the resourcetype parameter. You'd just need to get the list from the docs, have them as choices in your module arguments and pass the chosen one directly.

This comment has been minimized.

Copy link
@resmo

resmo Aug 26, 2019

Member

resourcetypename was added in 4.11 to the API, I would suggest to stick with this mapping for a bit longer to support cloudstack versions < 4.11

@ansibot ansibot added the stale_ci label Sep 3, 2019

@dpassante

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

Being able to retrieve resource limits seems useful to me, especially to give users visibility on their resources.
However, I also think that the use cases of a module that only retrieves the limit of a given resource is limited (no pun intended :)).

I would suggest using the 'listDomains' and 'listAccounts' APIs that also return available and used resources.
The module could thus return a list of resources with for each the limit, what is used and what is available.

This would allow users (and admins) to create usage reports or customize their deployments based on available resources for example.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.