('ip_address', 'ip_address', mapper.Noop), ('subnet', 'subnet_id', mapper.Resource('neutron.subnet')), ] ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('status', 'status', mapper.Noop), ('network', 'network_id', mapper.Resource('neutron.network')), ('project', 'tenant_id', mapper.Resource('project')), ('device', 'device_id', mapper.Noop), ('device_owner', 'device_owner', mapper.Noop), ('allowed_address_pairs', 'allowed_address_pairs', mapper.Noop), ('mac_address', 'mac_address', mapper.Noop), ('fixed_ips', 'fixed_ips', mapper.List(mapper.Dict(FIXED_IP_MAPPING))), ('security_groups', 'security_groups', mapper.Noop), ('is_enabled', 'admin_state_up', mapper.Noop), ] class Resource(base.Resource): """Resource class for ports in Networking V2 API""" def update(self, name=UNDEF, network=UNDEF, project=UNDEF, device=UNDEF, device_owner=UNDEF, allowed_address_pairs=UNDEF, mac_address=UNDEF, fixed_ips=UNDEF, security_groups=UNDEF, is_enabled=UNDEF): """ update properties of a port
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """ Resource class and its manager for networks in Networking V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('status', 'status', mapper.Noop), ('subnets', 'subnets', mapper.List(mapper.Resource('neutron.subnet'))), ('project', 'tenant_id', mapper.Resource('project')), ('is_shared', 'shared', mapper.Noop), ('is_enabled', 'admin_state_up', mapper.Noop), ('is_external', 'router:external', mapper.Noop), ('is_secured', 'port_security_enabled', mapper.Noop), ('segments', 'segments', mapper.Noop), ('provider_physical_network', 'provider:physical_network', mapper.Noop), ('provider_network_type', 'provider:network_type', mapper.Noop), ('provider_segmentation_id', 'segmentation_id', mapper.Noop), ('vlan_transparent', 'vlan_transparent', mapper.Noop), ] class Resource(base.Resource): """Resource class for networks in Networking V2 API"""
# under the License. """ Resource class and its manager for consistency group snapshot on Block Storage V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('description', 'display_description', mapper.Noop), ('source_cg', 'consistencygroup_id', mapper.List(mapper.Resource('cinder.consistency_group'))), ('project', 'project_id', mapper.List(mapper.Resource('project'))), ('user', 'user_id', mapper.List(mapper.Resource('user'))), ('status', 'status', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ] class Resource(base.Resource): """resource class for consistency group snapshot on Block Storage V2 API""" class Manager(base.Manager): """manager class for consistency group snapshot on Block Storage V2 API""" resource_class = Resource
# License for the specific language governing permissions and limitations # under the License. """ Resource class and its manager for LB Health Monitors in Networking V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('project', 'tenant_id', mapper.Resource('project')), ('is_enabled', 'admin_state_up', mapper.Noop), ('pools', 'pools', mapper.List(mapper.Resource('neutron.lb.pool'))), ('type', 'type', mapper.Noop), ('http_method', 'http_method', mapper.Noop), ('url_path', 'url_path', mapper.Noop), ('expected_codes', 'expected_codes', mapper.Noop), ('delay', 'delay', mapper.Noop), ('timeout', 'timeout', mapper.Noop), ('max_retries', 'max_retries', mapper.Noop), ] class Resource(base.Resource): """Resource class for LB Health Monitors in Networking V2 API""" def update(self, delay=UNDEF): """ Update a LB health monitor
# under the License. """ Resource class and its manager for LBaaS Health Monitors in Networking V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('pools', 'pools', mapper.List(mapper.Resource('neutron.lbaas.pool'))), ('type', 'type', mapper.Noop), ('http_method', 'http_method', mapper.Noop), ('url_path', 'url_path', mapper.Noop), ('expected_codes', 'expected_codes', mapper.Noop), ('delay', 'delay', mapper.Noop), ('timeout', 'timeout', mapper.Noop), ('max_retries', 'max_retries', mapper.Noop), ('project', 'tenant_id', mapper.Resource('project')), ('is_enabled', 'admin_state_up', mapper.Noop), ] class Resource(base.Resource): """Resource class for LBaaS Health Monitors in Networking V2 API"""
from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils from . import member from . import vip ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('lb_method', 'lb_method', mapper.Noop), ('protocol', 'protocol', mapper.Noop), ('subnet', 'subnet_id', mapper.Resource('neutron.subnet')), ('project', 'tenant_id', mapper.Resource('project')), ('health_monitors', 'health_monitors', mapper.List(mapper.Resource('neutron.lb.health_monitor'))), ('is_enabled', 'admin_state_up', mapper.Noop), ('status', 'status', mapper.Noop), ] class Resource(base.Resource): """Resource class for LB Pools in Networking V2 API""" _sub_manager_list = {'member': member.Manager, 'vip': vip.Manager} def update(self, name=UNDEF, lb_method=UNDEF): """ Update properties of a load balancer pool @keyword name: Pool name (str)
""" Resource class and its manager for routers in Networking V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper FIXED_IP_MAPPING = [('ip_address', 'ip_address', mapper.Noop), ('subnet', 'subnet_id', mapper.Resource('subnet'))] EXTERNAL_GATEWAY_INFO_MAPPING = [ ('network', 'network_id', mapper.Resource('network')), ('is_snat_enabled', 'enable_snat', mapper.Noop), ('external_fixed_ips', 'external_fixed_ips', mapper.List(mapper.Dict(FIXED_IP_MAPPING))) ] ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('status', 'status', mapper.Noop), ('routes', 'routes', mapper.Noop), ('project', 'tenant_id', mapper.Resource('project')), ('is_enabled', 'admin_state_up', mapper.Noop), ('external_gateway_info', 'external_gateway_info', mapper.Dict(EXTERNAL_GATEWAY_INFO_MAPPING)), ('is_distributed', 'distributed', mapper.Noop), ('is_ha', 'ha', mapper.Noop), ]