def _set(self, set_method, c, context, pool, old_pool=None):
        self._update_session_persistence(old_pool, pool, c, context)
        args = {'service_group': self.meta(pool, 'service_group', {})}
        os_name = pool.name

        conf_templates = c.device_cfg.get('templates')
        if conf_templates:
            service_group_templates = conf_templates.get("service-group", None)
        else:
            service_group_templates = None

        set_method(self._meta_name(pool),
                   protocol=openstack_mappings.service_group_protocol(
                       c, pool.protocol),
                   lb_method=openstack_mappings.service_group_lb_method(
                       c, pool.lb_algorithm),
                   service_group_templates=service_group_templates,
                   config_defaults=self._get_config_defaults(c, os_name),
                   axapi_args=args)

        # session persistence might need a vport update
        if pool.listener:
            # neutron-lbaas object graphs aren't fully populated ...
            pool.listener.default_pool_id = pool.listener.default_pool_id or pool.id
            # ... and don't update object references from ids
            pool.listener.default_pool = pool.listener.default_pool or pool
            self.a10_driver.listener._update(c, context, pool.listener)
    def _set(self, set_method, c, context, pool, old_pool=None):
        self._update_session_persistence(old_pool, pool, c, context)
        args = {'service_group': self.meta(pool, 'service_group', {})}
        os_name = pool.name

        conf_templates = c.device_cfg.get('templates')
        if conf_templates:
            service_group_templates = conf_templates.get("service-group", None)
        else:
            service_group_templates = None

        set_method(
            self._meta_name(pool),
            protocol=openstack_mappings.service_group_protocol(c, pool.protocol),
            lb_method=openstack_mappings.service_group_lb_method(c, pool.lb_algorithm),
            service_group_templates=service_group_templates,
            config_defaults=self._get_config_defaults(c, os_name),
            axapi_args=args)

        # session persistence might need a vport update
        if pool.listener:
            # neutron-lbaas object graphs aren't fully populated ...
            pool.listener.default_pool_id = pool.listener.default_pool_id or pool.id
            # ... and don't update object references from ids
            pool.listener.default_pool = pool.listener.default_pool or pool
            self.a10_driver.listener._update(c, context, pool.listener)
    def _set(self, set_method, c, context, pool):
        args = {'service_group': self.meta(pool, 'service_group', {})}

        set_method(
            self._meta_name(pool),
            protocol=openstack_mappings.service_group_protocol(c, pool['protocol']),
            lb_method=openstack_mappings.service_group_lb_method(c, pool['lb_method']),
            axapi_args=args)
    def _set(self, set_method, c, context, pool):
        args = {'service_group': self.meta(pool, 'service_group', {})}

        set_method(self._meta_name(pool),
                   protocol=openstack_mappings.service_group_protocol(
                       c, pool['protocol']),
                   lb_method=openstack_mappings.service_group_lb_method(
                       c, pool['lb_method']),
                   axapi_args=args)
    def _set(self, set_method, c, context, pool, old_pool=None):
        self._update_session_persistence(old_pool, pool, c, context)
        args = {'service_group': self.meta(pool, 'service_group', {})}
        set_method(
            self._meta_name(pool),
            protocol=openstack_mappings.service_group_protocol(c, pool.protocol),
            lb_method=openstack_mappings.service_group_lb_method(c, pool.lb_algorithm),
            axapi_args=args)

        # session persistence might need a vport update
        if pool.listener:
            pool.listener.default_pool_id = pool.listener.default_pool_id or pool.id
            self.a10_driver.listener._update(c, context, pool.listener)
    def _set(self, set_method, c, context, pool, old_pool=None):
        self._update_session_persistence(old_pool, pool, c, context)
        args = {'service_group': self.meta(pool, 'service_group', {})}
        set_method(self._meta_name(pool),
                   protocol=openstack_mappings.service_group_protocol(
                       c, pool.protocol),
                   lb_method=openstack_mappings.service_group_lb_method(
                       c, pool.lb_algorithm),
                   axapi_args=args)

        # session persistence might need a vport update
        if pool.listener:
            pool.listener.default_pool_id = pool.listener.default_pool_id or pool.id
            self.a10_driver.listener._update(c, context, pool.listener)
    def _set(self, set_method, c, context, pool, old_pool=None):
        self._update_session_persistence(old_pool, pool, c, context)
        args = {'service_group': self.meta(pool, 'service_group', {})}
        set_method(self._meta_name(pool),
                   protocol=openstack_mappings.service_group_protocol(
                       c, pool.protocol),
                   lb_method=openstack_mappings.service_group_lb_method(
                       c, pool.lb_algorithm),
                   axapi_args=args)

        # session persistence might need a vport update
        if pool.listener:
            # neutron-lbaas object graphs aren't fully populated ...
            pool.listener.default_pool_id = pool.listener.default_pool_id or pool.id
            # ... and don't update object references from ids
            pool.listener.default_pool = pool.listener.default_pool or pool
            self.a10_driver.listener._update(c, context, pool.listener)