Skip to content

Commit bf57354

Browse files
committed
ACLP Logs - Fix formatting
1 parent cdf2c04 commit bf57354

4 files changed

Lines changed: 171 additions & 97 deletions

File tree

linode_api4/groups/monitor.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
AlertDefinition,
99
AlertDefinitionEntity,
1010
AlertScope,
11-
MonitorDashboard,
12-
MonitorMetricsDefinition,
13-
MonitorService,
14-
MonitorServiceToken,
1511
LogsDestination,
1612
LogsDestinationType,
1713
LogsStream,
1814
LogsStreamStatus,
1915
LogsStreamType,
16+
MonitorDashboard,
17+
MonitorMetricsDefinition,
18+
MonitorService,
19+
MonitorServiceToken,
2020
)
2121

2222
__all__ = [
@@ -364,14 +364,14 @@ def destinations(self, *filters) -> PaginatedList:
364364
return self.client._get_and_filter(LogsDestination, *filters)
365365

366366
def destination_create(
367-
self,
368-
label: str,
369-
type: Union[LogsDestinationType, str],
370-
access_key_id: str,
371-
access_key_secret: str,
372-
bucket_name: str,
373-
host: str,
374-
path: Optional[str] = None,
367+
self,
368+
label: str,
369+
type: Union[LogsDestinationType, str],
370+
access_key_id: str,
371+
access_key_secret: str,
372+
bucket_name: str,
373+
host: str,
374+
path: Optional[str] = None,
375375
) -> LogsDestination:
376376
"""
377377
Creates a new :any:`LogsDestination` for logs on this account with
@@ -418,7 +418,7 @@ def destination_create(
418418
"access_key_secret": access_key_secret,
419419
"bucket_name": bucket_name,
420420
"host": host,
421-
}
421+
},
422422
}
423423

424424
if path is not None:
@@ -458,11 +458,11 @@ def streams(self, *filters) -> PaginatedList:
458458
return self.client._get_and_filter(LogsStream, *filters)
459459

460460
def stream_create(
461-
self,
462-
destinations: list[int],
463-
label: str,
464-
type: Union[LogsStreamType, str],
465-
status: Optional[Union[LogsStreamStatus, str]] = None
461+
self,
462+
destinations: list[int],
463+
label: str,
464+
type: Union[LogsStreamType, str],
465+
status: Optional[Union[LogsStreamStatus, str]] = None,
466466
) -> LogsStream:
467467
"""
468468
Creates a new :any:`LogsStream` for logs on this account with

linode_api4/objects/monitor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class LogsDestinationType(StrEnum):
145145
"""
146146
The type of destination for logs data sync. Currently, only ``akamai_object_storage`` is supported.
147147
"""
148+
148149
akamai_object_storage = "akamai_object_storage"
149150

150151

@@ -609,8 +610,10 @@ def history(self):
609610
"""
610611

611612
return self._client._get_objects(
612-
"{}/history".format(LogsDestination.api_endpoint.format(id=self.id)),
613-
LogsDestinationHistory
613+
"{}/history".format(
614+
LogsDestination.api_endpoint.format(id=self.id)
615+
),
616+
LogsDestinationHistory,
614617
)
615618

616619

@@ -694,14 +697,11 @@ def update_destinations(self, destinations: List[int]):
694697
"""
695698
if not destinations:
696699
raise ValueError("A destination id must be provided.")
697-
payload = {
698-
"destinations": destinations
699-
}
700+
payload = {"destinations": destinations}
700701

701702
# The Linode API PUT request expects the flat list of IDs
702703
result = self._client.put(
703-
self.api_endpoint.format(id=self.id),
704-
data=payload
704+
self.api_endpoint.format(id=self.id), data=payload
705705
)
706706
self._populate(result)
707707

@@ -717,5 +717,5 @@ def history(self):
717717

718718
return self._client._get_objects(
719719
"{}/history".format(LogsStream.api_endpoint.format(id=self.id)),
720-
LogsStreamHistory
720+
LogsStreamHistory,
721721
)

0 commit comments

Comments
 (0)