Skip to content

Commit 547af35

Browse files
fix: delete wrong data type
1 parent 7f99fb8 commit 547af35

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/spaceone/inventory/connector/aws_cloud_watch_connector/connector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ def _set_alarm_history(self, raw_alarm: Alarms) -> None:
164164

165165
alarm_histories = self.get_alarm_history(raw_alarm["AlarmName"])
166166
for alarm_history in alarm_histories:
167-
print(alarm_history["Timestamp"])
168167
history.append(
169168
{
170169
"date": alarm_history["Timestamp"],

src/spaceone/inventory/connector/aws_cloud_watch_connector/schema/data.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import logging
22

33
from schematics import Model
4-
from schematics.types import StringType, ModelType, ListType
4+
from schematics.types import StringType, ModelType, ListType, DateTimeType
55

6-
from spaceone.inventory.libs.schema.dynamic_field import DateTimeDyField
76
from spaceone.inventory.libs.schema.resource import AWSCloudService
87

98
_LOGGER = logging.getLogger(__name__)
@@ -19,7 +18,7 @@ class Action(Model):
1918

2019

2120
class History(Model):
22-
date = DateTimeDyField(deserialize_from="date")
21+
date = DateTimeType(deserialize_from="date")
2322
type = StringType(choices=("ConfigurationUpdate","StateUpdate","Action"), deserialize_from="type")
2423
description = StringType(deserialize_from="description")
2524

@@ -28,7 +27,7 @@ class Alarms(AWSCloudService):
2827
alarm_arn = StringType(deserialize_from="AlarmArn")
2928
name = StringType(deserialize_from="AlarmName")
3029
state_value = StringType(choices=("OK","ALARM","INSUFFICIENT_DATA"), deserialize_from="StateValue")
31-
state_updated_timestamp = DateTimeDyField(deserialize_from="StateUpdatedTimestamp")
30+
state_updated_timestamp = DateTimeType(deserialize_from="StateUpdatedTimestamp")
3231
actions_enabled = StringType(deserialize_from="actions_enabled")
3332
conditions = StringType(deserialize_from="conditions")
3433
actions = ListType(ModelType(Action, deserialize_from="action"), deserialize_from="actions")

0 commit comments

Comments
 (0)