Files
openstacksdk/openstack/shared_file_system/v2/share_snapshot.py
Stephen Finucane 3d2511f980 Blackify openstack.shared_file_system
Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: I54209e6cbfeec18a15771882d38730aca273238c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-05-05 10:59:36 +01:00

56 lines
2.1 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
class ShareSnapshot(resource.Resource):
resource_key = "snapshot"
resources_key = "snapshots"
base_path = "/snapshots"
# capabilities
allow_create = True
allow_fetch = True
allow_commit = True
allow_delete = True
allow_list = True
allow_head = False
_query_mapping = resource.QueryParameters("snapshot_id")
#: 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 user defined name of the resource.
display_name = resource.Body("display_name", type=str)
#: The user defined description of the resource
display_description = resource.Body("display_description", type=str)
#: ID of the project that the snapshot belongs to.
project_id = resource.Body("project_id", type=str)
#: The UUID of the source share that was used to
#: create the snapshot.
share_id = resource.Body("share_id", type=str)
#: The file system protocol of a share snapshot
share_proto = resource.Body("share_proto", type=str)
#: The snapshot's source share's size, in GiBs.
share_size = resource.Body("share_size", type=int)
#: The snapshot size, in GiBs.
size = resource.Body("size", type=int)
#: The snapshot status
status = resource.Body("status", type=str)
#: ID of the user that the snapshot was created by.
user_id = resource.Body("user_id", type=str)