Exemplo n.º 1
0
    def _create_wrapper(self,
                        add_is_virt_only=False,
                        is_virt_only_value="true",
                        add_stacking_id=False,
                        stacking_id=None,
                        pool_type=None,
                        add_management_enabled=False,
                        management_enabled_value="true"):
        attrs = {}
        if add_is_virt_only:
            attrs['virt_only'] = is_virt_only_value

        prod_attrs = {}
        if add_stacking_id:
            prod_attrs['stacking_id'] = stacking_id

        if add_management_enabled:
            prod_attrs['management_enabled'] = management_enabled_value

        calculatedAttributes = None
        if pool_type:
            calculatedAttributes = {'compliance_type': pool_type}
        pool = create_pool("pid",
                           "pname",
                           attributes=create_attribute_list(attrs),
                           productAttributes=create_attribute_list(prod_attrs),
                           calculatedAttributes=calculatedAttributes)
        return PoolWrapper(pool)
Exemplo n.º 2
0
    def _create_wrapper(self, add_is_virt_only=False, is_virt_only_value="true",
                        add_stacking_id=False, stacking_id=None):
        attrs = {}
        if add_is_virt_only:
            attrs['virt_only'] = is_virt_only_value

        prod_attrs = {}
        if add_stacking_id:
            prod_attrs['stacking_id'] = stacking_id

        pool = create_pool("pid", "pname", attributes=create_attribute_list(attrs),
                           productAttributes=create_attribute_list(prod_attrs))
        return PoolWrapper(pool)
    def _create_wrapper(self, add_is_virt_only=False, is_virt_only_value="true",
                        add_stacking_id=False, stacking_id=None, pool_type=None):
        attrs = {}
        if add_is_virt_only:
            attrs['virt_only'] = is_virt_only_value

        prod_attrs = {}
        if add_stacking_id:
            prod_attrs['stacking_id'] = stacking_id

        calculatedAttributes = None
        if pool_type:
            calculatedAttributes = {'compliance_type': pool_type}
        pool = create_pool("pid", "pname", attributes=create_attribute_list(attrs),
                           productAttributes=create_attribute_list(prod_attrs),
                           calculatedAttributes=calculatedAttributes)
        return PoolWrapper(pool)
    def _create_wrapper(self,
                        add_is_virt_only=False,
                        is_virt_only_value="true",
                        add_stacking_id=False,
                        stacking_id=None):
        attrs = {}
        if add_is_virt_only:
            attrs['virt_only'] = is_virt_only_value

        prod_attrs = {}
        if add_stacking_id:
            prod_attrs['stacking_id'] = stacking_id

        pool = create_pool("pid",
                           "pname",
                           attributes=create_attribute_list(attrs),
                           productAttributes=create_attribute_list(prod_attrs))
        return PoolWrapper(pool)