Exemple #1
0
    def _set(self, c, set_method, context, hm, **kwargs):
        hm_name = self._meta_name(hm)
        method = None
        url = None
        expect_code = None
        os_name = hm.name
        port = kwargs.get("port")

        if hm.type in ['HTTP', 'HTTPS']:
            method = hm.http_method
            url = hm.url_path
            expect_code = hm.expected_codes

        self._ensure_timeout_does_not_exceed_delay(hm)

        args = self.meta(hm, 'hm', {})

        set_method(hm_name,
                   openstack_mappings.hm_type(c, hm.type),
                   hm.delay,
                   hm.timeout,
                   hm.max_retries,
                   method=method,
                   url=url,
                   expect_code=expect_code,
                   port=port,
                   config_defaults=self._get_config_defaults(c, os_name),
                   axapi_args=args)
    def _set(self, c, set_method, context, hm):
        hm_name = self._meta_name(hm)
        method = None
        url = None
        expect_code = None
        if hm['type'] in ['HTTP', 'HTTPS']:
            method = hm['http_method']
            url = hm['url_path']
            expect_code = hm['expected_codes']

        args = self.meta(hm, 'hm', {})

        set_method(hm_name, openstack_mappings.hm_type(c, hm['type']),
                   hm['delay'], hm['timeout'], hm['max_retries'],
                   method=method, url=url, expect_code=expect_code,
                   axapi_args=args)
    def _set(self, c, set_method, context, hm):
        hm_name = self._meta_name(hm)
        method = None
        url = None
        expect_code = None
        if hm['type'] in ['HTTP', 'HTTPS']:
            method = hm['http_method']
            url = hm['url_path']
            expect_code = hm['expected_codes']

        args = self.meta(hm, 'hm', {})

        set_method(hm_name, openstack_mappings.hm_type(c, hm['type']),
                   hm['delay'], hm['timeout'], hm['max_retries'],
                   method=method, url=url, expect_code=expect_code,
                   axapi_args=args)
    def _set(self, c, set_method, context, hm):
        hm_name = self._meta_name(hm)
        method = None
        url = None
        expect_code = None
        if hm.type in ['HTTP', 'HTTPS']:
            method = hm.http_method
            url = hm.url_path
            expect_code = hm.expected_codes

        self._ensure_timeout_does_not_exceed_delay(hm)

        args = self.meta(hm, 'hm', {})

        set_method(hm_name, openstack_mappings.hm_type(c, hm.type),
                   hm.delay, hm.timeout, hm.max_retries,
                   method=method, url=url, expect_code=expect_code,
                   axapi_args=args)