# 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 volume attachment in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('device', 'device', mapper.Noop), ('server', 'serverId', mapper.Resource('nova.server')), ('volume', 'volumeId', mapper.Resource('volume')), ] class Resource(base.Resource): """Resource class for volume attachment in Compute API v2""" def detach(self): """ Detach a volume @rtype: None """ super(Resource, self).delete()
# under the License. """ Resource class and its manager for volume transfer on Block Storage V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from . import volume ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('auth_key', 'auth_key', mapper.Noop), ('volume', 'volume_id', mapper.Resource('cinder.volume')), ('created_at', 'created_at', mapper.DateTime), ] class Resource(base.Resource): """resource class for volume transfer on Block Storage V2 API""" def accept(self, auth_key): """ Accept a volume transfer @keyword auth_key: authentication key for a transfer @type auth_key: str @return: Accepted volume @rtype: yakumo.cinder.v2.volume.Resource """
# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 cloudpipes in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper ATTRIBUTE_MAPPING = [ ('server', 'instance_id', mapper.Resource('server')), ('project', 'project_id', mapper.Resource('project')), ('internal_ip', 'internal_ip', mapper.Noop), ('public_ip', 'public_ip', mapper.Noop), ('public_port', 'public_port', mapper.Noop), ('created_at', 'created_at', mapper.Noop), ('status', 'state', mapper.Noop), ] class Resource(base.Resource): """Resource class for cloudpipes in Compute API v2""" def update(self, vpn_ip=UNDEF, vpn_port=UNDEF): """ Update properties of a cloudpipe
Resource class and its manager for security group rules in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('remote_ip_prefix', 'ip_range', mapper.Noop), ('port_range_min', 'from_port', mapper.Noop), ('port_range_max', 'to_port', mapper.Noop), ('protocol', 'ip_protocol', mapper.Noop), ('group', 'group', mapper.Noop), ('project', 'tenant_id', mapper.Resource('project')), ] class Resource(base.Resource): """Resource class for security group rules in Compute API v2""" def delete(self): """ Delete a security group rule @rtype: None """ super(Resource, self).delete() self._reload_rules()
# under the License. """ Resource class and its manager for volume backup on Block Storage V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from . import volume_transfer ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'display_name', mapper.Noop), ('description', 'description', mapper.Noop), ('availability_zone', 'availability_zone', mapper.Resource('availability_zone')), ('source_volume', 'volume_id', mapper.Resource('cinder.volume')), ('size', 'size', mapper.Noop), ('object_count', 'object_count', mapper.Noop), ('container', 'container', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ('updated_at', 'updated_at', mapper.DateTime), ('status', 'status', mapper.Noop), ('fail_reason', 'fail_reason', mapper.Noop), ('has_dependent_backups', 'has_dependent_backups', mapper.Noop), ('is_incremental', 'incremental', mapper.Noop), ('is_incremental', 'is_incremental', mapper.Noop), ] class Resource(base.Resource):
Resource class and its manager for metering label rules for 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), ('remote_ip_prefix', 'remote_ip_prefix', mapper.Noop), ('direction', 'direction', mapper.Noop), ('excluded', 'excluded', mapper.Noop), ('metering_label', 'metering_label_id', mapper.Resource('neutron.metering.label')), ] class Resource(base.Resource): """Resource class for metering label rules for Networking v2 API""" class Manager(base.Manager): """Manager class for metering label rules for Networking v2 API""" resource_class = Resource service_type = 'network' _attr_mapping = ATTRIBUTE_MAPPING _hidden_methods = ["update"] _json_resource_key = '"metering_label_rule'
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 image members in Image V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('user', 'member_id', mapper.Resource('user')), ('image', 'image_id', mapper.Resource('glance.image')), ('schema', 'schema', mapper.Noop), ('status', 'status', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ('updated_at', 'updated_at', mapper.DateTime), ] class Resource(base.GlanceV2Resource): """resource class for image members on Image V2 API""" def update(self, status=UNDEF): """ Update status of a member @keyword status: Member status
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 floating IP DNS entries in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('domain', 'domain', mapper.Noop), ('project', 'project', mapper.Resource('project')), ('scope', 'scope', mapper.Noop), ('availability_zone', 'availability_zone', mapper.Resource('nova.availability_zone')), ] class Resource(base.Resource): """Resource class for floating IP DNS entries in Compute API v2""" def update(self, new_domain=UNDEF, project=UNDEF, scope=UNDEF, availability_zone=UNDEF): """ Update properties of a domain
# under the License. """ Resource class and its manager for users in Identity 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), ('username', 'username', mapper.Noop), ('password', 'password', mapper.Noop), ('email', 'email', mapper.Noop), ('project', 'project_id', mapper.Resource('keystone.project')), ('is_enabled', 'enabled', mapper.Noop), ] class Resource(base.Resource): """resource class for users on Identity V2 API""" def update(self, name=UNDEF, username=UNDEF, password=UNDEF, email=UNDEF, project=UNDEF, is_enabled=UNDEF): """ update properties of a user
from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('protocol', 'protocol', mapper.Noop), ('protocol_port', 'protocol_port', mapper.Noop), ('connection_limit', 'connection_limit', mapper.Noop), ('default_tls_container_ref', 'default_tls_container_ref', mapper.Noop), ('sni_container_refs', 'sni_container_refs', mapper.Noop), ('default_pool', 'default_pool_id', mapper.Resource('neutron.lbaas.pool')), ('project', 'tenant_id', mapper.Resource('project')), ('is_enabled', 'admin_state_up', mapper.Noop), ] class Resource(base.Resource): """Resource class for LBaaS listeners in Networking V2 API""" def update(self, name=UNDEF, description=UNDEF, connection_limit=UNDEF, default_tls_container_ref=UNDEF, sni_container_refs=UNDEF, is_enabled=UNDEF): """ Update a listener for LBaaS
('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('access_ipv4', 'accessIPv4', mapper.Noop), ('access_ipv6', 'accessIPv6', mapper.Noop), ('addresses', 'addresses', mapper.Noop), ('host', 'OS-EXT-SRV-ATTR:host', mapper.Noop), ('networks', 'networks', mapper.Noop), ('disks', 'block_device_mapping_v2', mapper.Noop), ('user_data', 'user_data', mapper.Base64), ('progress', 'progress', mapper.Noop), ('status', 'status', mapper.Noop), ('task_state', 'OS-EXT-STS:task_state', mapper.Noop), ('created_at', 'created', mapper.DateTime), ('updated_at', 'updated', mapper.DateTime), ('metadata', 'metadata', mapper.Noop), ('flavor', 'flavorRef', mapper.Resource('nova.flavor')), ('image', 'imageRef', mapper.Resource('image')), ('project', 'tenant_id', mapper.Resource('project')), ('user', 'user_id', mapper.Resource('user')), ('key_pair', 'key_name', mapper.Resource('nova.key_pair')), ('error_reason', 'fault', mapper.Noop), ('availability_zone', 'availability_zone', mapper.Resource('nova.availability_zone')), ('availability_zone', 'OS-EXT-AZ:availability_zone', mapper.Resource('nova.availability_zone')), ] class Resource(base.Resource): """Resource class for servers in Compute API v2"""
# License for the specific language governing permissions and limitations # under the License. """ Resource class and its manager for regions in Identity V3 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('description', 'description', mapper.Noop), ('parent', 'parent_region_id', mapper.Resource('keystone.region')), ] class Resource(base.Resource): """resource class for regions on Identity V3 API""" def update(self, description=UNDEF, parent=UNDEF): """ Update properties of a region @keyword description: Description @type description: str @keyword parent: Parent region @type parent: yakumo.keystone.v3.region.Resource @rtype: None
# under the License. """ Resource class and its manager for floating IPs in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('fixed_ip', 'fixed_ip', mapper.Noop), ('server', 'instance_id', mapper.Resource('nova.server')), ('ip', 'ip', mapper.Noop), ('pool', 'pool', mapper.Noop), ] class Resource(base.Resource): """Resource class for floating IPs in Compute API v2""" def associate(self, server=None): """ Associate a floating IP @keyword server: Server @type server: yakumo.nova.v2.server.Resource @rtype: None
""" Resource class and its manager for VPN services 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), ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('router', 'router_id', mapper.Resource('neutron.router')), ('subnet', 'subnet_id', mapper.Resource('neutron.subnet')), ('project', 'tenant_id', mapper.Resource('project')), ('is_enabled', 'admin_state_up', mapper.Noop), ('status', 'status', mapper.Noop), ] class Resource(base.Resource): """Resource class for VPN services in Networking V2 API""" def update(self, name=UNDEF, description=UNDEF, router=UNDEF, subnet=UNDEF, project=UNDEF, is_enabled=UNDEF): """ Update properties of a VPN service
# License for the specific language governing permissions and limitations # under the License. """ Resource class and its manager for floating IPs 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), ('floating_network', 'floating_network_id', mapper.Resource('neutron.network')), ('floating_ip', 'floating_ip_address', mapper.Noop), ('fixed_ip', 'fixed_ip_address', mapper.Noop), ('router', 'router_id', mapper.Resource('neutron.router')), ('port', 'port_id', mapper.Resource('neutron.port')), ('project', 'tenant_id', mapper.Resource('project')), ] class Resource(base.Resource): """Resource class for floating IPs in Networking V2 API""" def update(self, floating_ip=UNDEF, port=UNDEF): """ Update a floting IP address @keyword floating_ip: Floating IP address
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 interface attachment in Compute API v2 """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('port', 'port_id', mapper.Resource('port')), ('id', 'port_id', mapper.Resource('port')), ('network', 'net_id', mapper.Resource('network')), ('mac_addr', 'mac_addr', mapper.Noop), ('fixed_ips', 'fixed_ips', mapper.Noop), ('status', 'port_state', mapper.Noop), ] class Resource(base.Resource): """Resource class for interface attachment in Compute API v2""" def detach(self): """ Detach a interface @rtype: None
# 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 ports 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('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),
""" from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('protocol', 'protocol', mapper.Noop), ('address', 'address', mapper.Noop), ('protocol_port', 'protocol_port', mapper.Noop), ('connection_limit', 'connection_limit', mapper.Noop), ('pool', 'pool_id', mapper.Resource('neutron.lb.pool')), ('subnet', 'subnet_id', mapper.Resource('neutron.subnet')), ('project', 'tenant_id', mapper.Resource('project')), ('port', 'port_id', mapper.Resource('neutron.port')), ('is_enabled', 'admin_state_up', mapper.Noop), ('is_session_persistent', 'session_persistence', mapper.Noop), ('status', 'status', mapper.Noop), ] class Resource(base.Resource): """Resource class for LB virtual IPs in Networking V2 API""" def update(self, name=UNDEF, description=UNDEF, session_persistence=UNDEF,
""" Resource class and its manager for volume snapshots 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', 'description', mapper.Noop), ('size', 'size', mapper.Noop), ('status', 'status', mapper.Noop), ('force', 'force', mapper.Noop), ('source', 'volume_id', mapper.Resource('cinder.volume')), ('progress', 'os-extended-snapshot-attributes:progress', mapper.Noop), ('project', 'os-extended-snapshot-attributes:project_id', mapper.Resource('project')), ('metadata', 'metadata', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ('updated_at', 'updated_at', mapper.DateTime), ] class Resource(base.Resource): """resource class for volume snapshots on Block Storage V2 API""" _stable_state = ['available', 'error', 'error_deleting'] def get_metadata(self):
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 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):
# 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"""
from yakumo import mapper from yakumo import utils from yakumo.cinder.v2.snapshot import Resource as Snapshot from yakumo.cinder.v2.volume_type import Resource as VolumeType from yakumo.nova.v2.image import Resource as NovaV2Image from yakumo.glance.v1.image import Resource as GlanceV1Image from yakumo.glance.v2.image import Resource as GlanceV2Image ATTRIBUTE_MAPPING = [ ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('volume_type', 'volume_type', mapper.Noop), ('size', 'size', mapper.Noop), ('availability_zone', 'availability_zone', mapper.Resource('availability_zone')), ('source_image', 'imageRef', mapper.Resource('image')), ('source_volume', 'source_volid', mapper.Resource('cinder.volume')), ('source_snapshot', 'snapshot_id', mapper.Resource('cinder.volume_snapshot')), ('source_replica', 'source_replica', mapper.Noop), ('consistencygroup', 'consistencygroup_id', mapper.Resource('cinder.consistency_group')), ('scheduler_hints', 'scheduler_hints', mapper.Noop), ('metadata', 'metadata', mapper.Noop), ('project', 'tenant_id', mapper.Resource('project')), ('project', 'os-vol-tenant-attr:tenant_id', mapper.Resource('project')), ('is_multiattach', 'multiattach', mapper.Noop), ('id', 'id', mapper.Noop), ('attachments', 'attachments', mapper.Noop), ('attachment', 'attachment', mapper.Resource('volume_attachment')),
from yakumo import utils from . import image_member ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('file', 'file', mapper.Noop), ('disk_format', 'disk_format', mapper.Noop), ('container_format', 'container_format', mapper.Noop), ('size', 'size', mapper.Noop), ('virtual_size', 'virtual_size', mapper.Noop), ('checksum', 'checksum', mapper.Noop), ('min_ram', 'min_ram', mapper.Noop), ('min_disk', 'min_disk', mapper.Noop), ('owner', 'owner', mapper.Resource('keystone.user')), ('visibility', 'visibility', mapper.Noop), ('is_protected', 'protected', mapper.Noop), ('status', 'status', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ('updated_at', 'updated_at', mapper.DateTime), ('tags', 'tags', mapper.Noop), ] class Resource(base.GlanceV2Resource): """resource class for images on Image V2 API""" _stable_state = ['active', 'killed', 'deleted', 'deactivated'] _sub_manager_list = {'members': image_member.Manager}
from yakumo.cinder.v1.snapshot import Resource as Snapshot from yakumo.cinder.v1.volume_type import Resource as VolumeType from yakumo.nova.v2.image import Resource as NovaV2Image from yakumo.glance.v1.image import Resource as GlanceV1Image from yakumo.glance.v2.image import Resource as GlanceV2Image ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'display_name', mapper.Noop), ('description', 'display_description', mapper.Noop), ('availability_zone', 'availability_zone', mapper.Noop), ('size', 'size', mapper.Noop), ('status', 'status', mapper.Noop), ('attachments', 'attachments', mapper.Noop), ('volume_type', 'volume_type', mapper.Resource('cinder.volume_type')), ('source_image', 'imageRef', mapper.Resource('image')), ('source_snapshot', 'snapshot_id', mapper.Resource('cinder.volume_snapshot')), ('source_volume', 'source_volid', mapper.Resource('cinder.volume')), ('is_bootable', 'bootable', mapper.BoolStr), ('is_encrypted', 'encrypted', mapper.Noop), ('is_multiattach', 'multiattach', mapper.Noop), ('project', 'os-vol-tenant-attr:tenant_id', mapper.Resource('project')), ('driver_data', 'os-volume-replication:driver_data', mapper.Noop), ('extended_status', 'os-volume-replication:extended_status', mapper.Noop), ('host', 'os-vol-host-attr:hos', mapper.Noop), ('metadata', 'metadata', mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ]
Resource class and its manager for endpoints in Identity V2 API """ from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import exception ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('public_url', 'publicurl', mapper.Noop), ('internal_url', 'internalurl', mapper.Noop), ('admin_url', 'adminurl', mapper.Noop), ('region', 'region', mapper.Noop), ('is_enabled', 'enabled', mapper.Noop), ('service', 'service_id', mapper.Resource('keystone.service')), ] class Resource(base.Resource): """resource class for endpoints on Identity V2 API""" class Manager(base.Manager): """manager class for endpoints on Identity V2 API""" resource_class = Resource service_type = 'identity' _attr_mapping = ATTRIBUTE_MAPPING _hidden_methods = ["update"] _json_resource_key = 'endpoint'
('dns1', 'dns1', mapper.Noop), ('dns2', 'dns2', mapper.Noop), ('gateway', 'gateway', mapper.Noop), ('gateway_v6', 'gateway_v6', mapper.Noop), ('host', 'host', mapper.Noop), ('name', 'label', mapper.Noop), ('mtu', 'mtu', mapper.Noop), ('netmask', 'netmask', mapper.Noop), ('netmask_v6', 'netmask_v6', mapper.Noop), ('priority', 'priority', mapper.Noop), ('rxtx_base', 'rxtx_base', mapper.Noop), ('vlan', 'vlan', mapper.Noop), ('vpn_private_address', 'vpn_private_address', mapper.Noop), ('vpn_public_address', 'vpn_public_address', mapper.Noop), ('vpn_public_port', 'vpn_public_port', mapper.Noop), ('project', 'project_id', mapper.Resource('project')), ('created_at', 'created_at', mapper.DateTime), ('deleted_at', 'deleted_at', mapper.DateTime), ('updated_at', 'updated_at', mapper.DateTime), ('is_deleted', 'deleted', mapper.Noop), ('is_dhcp_enabled', 'enable_dhcp', mapper.Noop), ('is_injected', 'injected', mapper.Noop), ('is_address_shared', 'share_address', mapper.Noop), ('is_multi_host', 'multi_host', mapper.Noop), ] class Resource(base.Resource): """Resource class for networks in Compute API v2""" def associate(self): """
import os import stat from yakumo import base from yakumo.constant import UNDEF from yakumo import mapper from yakumo import utils ATTRIBUTE_MAPPING = [ ('name', 'name', mapper.Noop), ('fingerprint', 'fingerprint', mapper.Noop), ('public_key', 'public_key', mapper.Noop), ('private_key', 'private_key', mapper.Noop), ('type', 'type', mapper.Noop), ('user', 'user_id', mapper.Resource('user')), ] class Resource(base.Resource): """Resource class for key pairs in Compute API v2""" class Manager(base.Manager): """Manager class for key pairs in Compute API v2""" resource_class = Resource service_type = 'compute' _attr_mapping = ATTRIBUTE_MAPPING _hidden_methods = ["update"] _id_attr = 'name'
# 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
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # 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 subnets 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), ('network', 'network_id', mapper.Resource('neutron.network')), ('gateway_ip', 'gateway_ip', mapper.Noop), ('dns_nameservers', 'dns_nameservers', mapper.Noop), ('host_route', 'host_route', mapper.Noop), ('ip_version', 'ip_version', mapper.Noop), ('cidr', 'cidr', mapper.Noop), ('is_dhcp_enabled', 'enable_dhcp', mapper.Noop), ('ipv6_ra_mode', 'ipv6_ra_mode', mapper.Noop), ('ipv6_address_mode', 'ipv6_address_mode', mapper.Noop), ] class Resource(base.Resource): """Resource class for subnets in Networking V2 API""" def update(self, name=UNDEF,
ATTRIBUTE_MAPPING = [ ('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('description', 'description', mapper.Noop), ('peer_address', 'peer_address', mapper.Noop), ('peer_id', 'peer_id', mapper.Noop), ('local_ep_group_id', 'local_ep_group_id', mapper.Noop), ('peer_ep_group_id', 'peer_ep_group_id', mapper.Noop), ('peer_cidrs', 'peer_cidrs', mapper.Noop), ('route_mode', 'route_mode', mapper.Noop), ('mtu', 'mtu', mapper.Noop), ('auth_mode', 'auth_mode', mapper.Noop), ('psk', 'psk', mapper.Noop), ('initiator', 'initiator', mapper.Noop), ('ikepolicy', 'ikepolicy_id', mapper.Resource('neutron.vpn.ikepolicy')), ('ipsecpolicy', 'ipsecpolicy_id', mapper.Resource('neutron.vpn.ipsecpolicy')), ('vpnservice', 'vpnservice_id', mapper.Resource('neutron.vpn.vpnservice')), ('project', 'tenant_id', mapper.Resource('project')), ('dpd', 'dpd', mapper.Noop), ('action', 'action', mapper.Noop), ('interval', 'interval', mapper.Noop), ('timeout', 'timeout', mapper.Noop), ('is_enabled', 'admin_state_up', mapper.Noop), ('status', 'status', mapper.Noop), ] class Resource(base.Resource): """Resource class for VPN IPSec site connections in Networking V2 API"""