Skip to content

Commit

Permalink
feat: added info fields
Browse files Browse the repository at this point in the history
  • Loading branch information
1101-1 committed Nov 9, 2024
1 parent 7d18ada commit d1d9486
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion plugins/gcp/fix_plugin_gcp/resources/filestore.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime
import logging
from typing import ClassVar, Dict, Optional, List, Type
from typing import ClassVar, Dict, Optional, List, Type, Any

from attr import define, field

Expand All @@ -19,6 +19,14 @@
@define(eq=False, slots=False)
class GcpFilestoreBackup(GcpResource):
kind: ClassVar[str] = "gcp_filestore_backup"
_kind_display: ClassVar[str] = "GCP Filestore Backup"
_kind_description: ClassVar[str] = (
"GCP Filestore Backup is a service that allows you to create backups of your Filestore instances."
" It provides a way to protect your data and restore it in case of data loss."
)
_docs_url: ClassVar[str] = "https://cloud.google.com/filestore/docs/backups"
_kind_service: ClassVar[Optional[str]] = "filestore"
_metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "storage"}
api_spec: ClassVar[GcpApiSpec] = GcpApiSpec(
service="file",
version="v1",
Expand Down Expand Up @@ -169,6 +177,14 @@ class GcpReplication:
@define(eq=False, slots=False)
class GcpFilestoreInstance(GcpResource, BaseNetworkShare):
kind: ClassVar[str] = "gcp_filestore_instance"
_kind_display: ClassVar[str] = "GCP Filestore Instance"
_kind_description: ClassVar[str] = (
"GCP Filestore Instance is a fully managed file storage service that provides scalable and high-performance"
" file systems for applications running on Google Cloud."
)
_docs_url: ClassVar[str] = "https://cloud.google.com/filestore/docs/instances"
_kind_service: ClassVar[Optional[str]] = "filestore"
_metadata: ClassVar[Dict[str, Any]] = {"icon": "network_share", "group": "storage"}
_reference_kinds: ClassVar[ModelReference] = {
"successors": {
"default": [
Expand Down Expand Up @@ -282,6 +298,14 @@ def collect_snapshots() -> None:
class GcpFilestoreSnapshot(GcpResource):
# collected via GcpFilestoreInstance()
kind: ClassVar[str] = "gcp_filestore_snapshot"
_kind_display: ClassVar[str] = "GCP Filestore Snapshot"
_kind_description: ClassVar[str] = (
"GCP Filestore Snapshot is a point-in-time copy of a Filestore instance, allowing you to restore"
" data to a previous state or create new instances from the snapshot."
)
_docs_url: ClassVar[str] = "https://cloud.google.com/filestore/docs/snapshots"
_kind_service: ClassVar[Optional[str]] = "filestore"
_metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"}
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("name").or_else(S("id")).or_else(S("selfLink")),
"name": S("name"),
Expand Down

0 comments on commit d1d9486

Please sign in to comment.