Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions scaleway-async/scaleway_async/cockpit/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
TokenScopes,
ActivateCockpitRequest,
DeactivateCockpitRequest,
ResetCockpitGrafanaRequest,
CreateDatasourceRequest,
CreateTokenRequest,
CreateContactPointRequest,
Expand All @@ -64,7 +63,6 @@
marshal_DeleteGrafanaUserRequest,
marshal_DisableManagedAlertsRequest,
marshal_EnableManagedAlertsRequest,
marshal_ResetCockpitGrafanaRequest,
marshal_ResetGrafanaUserPasswordRequest,
marshal_SelectPlanRequest,
marshal_TriggerTestAlertRequest,
Expand Down Expand Up @@ -248,36 +246,6 @@ async def deactivate_cockpit(
self._throw_on_error(res)
return unmarshal_Cockpit(res.json())

async def reset_cockpit_grafana(
self,
*,
project_id: Optional[str] = None,
) -> Cockpit:
"""
Reset your Cockpit's Grafana associated with the specified Project ID.
:param project_id: ID of the Project the Cockpit belongs to.
:return: :class:`Cockpit <Cockpit>`

Usage:
::

result = await api.reset_cockpit_grafana()
"""

res = self._request(
"POST",
f"/cockpit/v1beta1/reset-grafana",
body=marshal_ResetCockpitGrafanaRequest(
ResetCockpitGrafanaRequest(
project_id=project_id,
),
self.client,
),
)

self._throw_on_error(res)
return unmarshal_Cockpit(res.json())

async def create_datasource(
self,
*,
Expand Down
13 changes: 0 additions & 13 deletions scaleway-async/scaleway_async/cockpit/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
TokenScopes,
ActivateCockpitRequest,
DeactivateCockpitRequest,
ResetCockpitGrafanaRequest,
CreateDatasourceRequest,
CreateTokenRequest,
CreateContactPointRequest,
Expand Down Expand Up @@ -685,18 +684,6 @@ def marshal_EnableManagedAlertsRequest(
return output


def marshal_ResetCockpitGrafanaRequest(
request: ResetCockpitGrafanaRequest,
defaults: ProfileDefaults,
) -> Dict[str, Any]:
output: Dict[str, Any] = {}

if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

return output


def marshal_ResetGrafanaUserPasswordRequest(
request: ResetGrafanaUserPasswordRequest,
defaults: ProfileDefaults,
Expand Down
8 changes: 0 additions & 8 deletions scaleway-async/scaleway_async/cockpit/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,6 @@ class DeactivateCockpitRequest:
"""


@dataclass
class ResetCockpitGrafanaRequest:
project_id: Optional[str]
"""
ID of the Project the Cockpit belongs to.
"""


@dataclass
class CreateDatasourceRequest:
project_id: Optional[str]
Expand Down
32 changes: 0 additions & 32 deletions scaleway/scaleway/cockpit/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
TokenScopes,
ActivateCockpitRequest,
DeactivateCockpitRequest,
ResetCockpitGrafanaRequest,
CreateDatasourceRequest,
CreateTokenRequest,
CreateContactPointRequest,
Expand All @@ -64,7 +63,6 @@
marshal_DeleteGrafanaUserRequest,
marshal_DisableManagedAlertsRequest,
marshal_EnableManagedAlertsRequest,
marshal_ResetCockpitGrafanaRequest,
marshal_ResetGrafanaUserPasswordRequest,
marshal_SelectPlanRequest,
marshal_TriggerTestAlertRequest,
Expand Down Expand Up @@ -248,36 +246,6 @@ def deactivate_cockpit(
self._throw_on_error(res)
return unmarshal_Cockpit(res.json())

def reset_cockpit_grafana(
self,
*,
project_id: Optional[str] = None,
) -> Cockpit:
"""
Reset your Cockpit's Grafana associated with the specified Project ID.
:param project_id: ID of the Project the Cockpit belongs to.
:return: :class:`Cockpit <Cockpit>`

Usage:
::

result = api.reset_cockpit_grafana()
"""

res = self._request(
"POST",
f"/cockpit/v1beta1/reset-grafana",
body=marshal_ResetCockpitGrafanaRequest(
ResetCockpitGrafanaRequest(
project_id=project_id,
),
self.client,
),
)

self._throw_on_error(res)
return unmarshal_Cockpit(res.json())

def create_datasource(
self,
*,
Expand Down
13 changes: 0 additions & 13 deletions scaleway/scaleway/cockpit/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
TokenScopes,
ActivateCockpitRequest,
DeactivateCockpitRequest,
ResetCockpitGrafanaRequest,
CreateDatasourceRequest,
CreateTokenRequest,
CreateContactPointRequest,
Expand Down Expand Up @@ -685,18 +684,6 @@ def marshal_EnableManagedAlertsRequest(
return output


def marshal_ResetCockpitGrafanaRequest(
request: ResetCockpitGrafanaRequest,
defaults: ProfileDefaults,
) -> Dict[str, Any]:
output: Dict[str, Any] = {}

if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

return output


def marshal_ResetGrafanaUserPasswordRequest(
request: ResetGrafanaUserPasswordRequest,
defaults: ProfileDefaults,
Expand Down
8 changes: 0 additions & 8 deletions scaleway/scaleway/cockpit/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,6 @@ class DeactivateCockpitRequest:
"""


@dataclass
class ResetCockpitGrafanaRequest:
project_id: Optional[str]
"""
ID of the Project the Cockpit belongs to.
"""


@dataclass
class CreateDatasourceRequest:
project_id: Optional[str]
Expand Down