Skip to content

Commit

Permalink
Merge pull request #96 from mz-ko/master
Browse files Browse the repository at this point in the history
feat: Add new layout for S3 lifecycle.
  • Loading branch information
mz-ko authored Aug 14, 2024
2 parents 06f8b4b + dba6063 commit cf2b47d
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
EnumDyField,
SizeField,
MoreField,
DictDyField,
)
from spaceone.inventory.libs.schema.dynamic_layout import (
ItemDynamicLayout,
Expand Down Expand Up @@ -196,6 +197,26 @@
],
)

lifecycle_rules = TableDynamicLayout.set_fields(
"Lifecycle Rules",
"data.lifecycle_rules",
fields=[
TextDyField.data_source("ID", "id"),
EnumDyField.data_source(
"Status",
"status",
default_state={"safe": ["Enabled"], "alert": ["Disabled"]},
),
DictDyField.data_source("Expiration", "expiration"),
DictDyField.data_source(
"Noncurrent Version Expiration", "noncurrent_version_expiration"
),
DictDyField.data_source(
"Noncurrent Version Expiration", "noncurrent_version_expiration"
),
],
)

metadata = CloudServiceMeta.set_layouts(
layouts=[
bucket,
Expand All @@ -210,6 +231,7 @@
transfer_acc,
requester_pays,
topic_conf,
lifecycle_rules,
]
)

Expand Down

0 comments on commit cf2b47d

Please sign in to comment.