Files
openstacksdk/openstack/shared_file_system/v2/share_network.py
Reynaldo Bontje 692b7f39e3 Added neutron fields to share network resource.
Adds fields to share network resource, enabling the creation of share
networks that use neutron networks and neutron subnets.

Change-Id: Ie6cace724bcb2084b71942be35bac79f085215d7
2023-05-10 10:42:04 +01:00

66 lines
2.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
from openstack import resource
from openstack.shared_file_system.v2 import share_network_subnet
class ShareNetwork(resource.Resource):
resource_key = "share_network"
resources_key = "share_networks"
base_path = "/share-networks"
# capabilities
allow_create = True
allow_fetch = True
allow_commit = True
allow_delete = True
allow_list = True
allow_head = False
_query_mapping = resource.QueryParameters(
"project_id",
"name",
"description",
"created_since",
"created_before",
"security_service_id",
"limit",
"offset",
all_projects="all_tenants",
)
#: Properties
#: The date and time stamp when the resource was created within the
#: services database.
created_at = resource.Body("created_at")
#: The user defined description of the resource.
description = resource.Body("description", type=str)
#: The ID of the project that owns the resource.
project_id = resource.Body("project_id", type=str)
#: A list of share network subnets that pertain to the related share
#: network.
share_network_subnets = resource.Body(
"share_network_subnets",
type=list,
list_type=share_network_subnet.ShareNetworkSubnet,
)
#: The UUID of a neutron network when setting up or
#: updating a share network subnet with neutron.
neutron_net_id = resource.Body("neutron_net_id", type=str)
#: The UUID of the neutron subnet when setting up or updating
#: a share network subnet with neutron.
neutron_subnet_id = resource.Body("neutron_subnet_id", type=str)
#: The date and time stamp when the resource was last updated within
#: the services database.
updated_at = resource.Body("updated_at", type=str)