Пример #1
0
    def __init__(self, connection=None, *a, **kw):
        if 'endpoint' in kw:
            self.endpoint = kw['endpoint']

        self.connection = connection or Connection(
            config.base_url, kw.get('verify', not config.assume_untrusted))

        self.r = kw.get('r', None)
        self.json = kw.get('json',
                           objectify_response_json(self.r) if self.r else {})
        self.last_elapsed = kw.get('last_elapsed', None)
Пример #2
0
    def __init__(self, argument_spec, **kwargs):
        kwargs['supports_check_mode'] = False

        super().__init__(argument_spec=argument_spec, **kwargs)

        # Die if we don't have AWX_KIT installed
        if not HAS_AWX_KIT:
            self.fail_json(msg=missing_required_lib('awxkit'))

        # Establish our conneciton object
        self.connection = Connection(self.host, verify=self.verify_ssl)