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
2 changes: 1 addition & 1 deletion DO_OPENAPI_COMMIT_SHA.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
97dca99
380d7ee
48 changes: 48 additions & 0 deletions src/pydo/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
FirewallsOperations,
FunctionsAccessKeyOperations,
FunctionsOperations,
GatewayApprovalsOperations,
GatewayCodeOperations,
GatewaySessionApprovalsOperations,
GatewayToolsOperations,
GenaiOperations,
HarnessOperations,
ImageActionsOperations,
ImagesOperations,
InferenceOperations,
Expand All @@ -45,6 +50,8 @@
KubernetesOperations,
LoadBalancersOperations,
McpServersOperations,
MicrovmCheckpointsOperations,
MicrovmsOperations,
MonitoringOperations,
NfsOperations,
OneClicksOperations,
Expand All @@ -63,6 +70,7 @@
ReservedIPv6Operations,
SecurityOperations,
SessionsOperations,
SignalsOperations,
SizesOperations,
SnapshotsOperations,
SpacesKeyOperations,
Expand Down Expand Up @@ -108,6 +116,14 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype tools: pydo.operations.ToolsOperations
:ivar users: UsersOperations operations
:vartype users: pydo.operations.UsersOperations
:ivar gateway_tools: GatewayToolsOperations operations
:vartype gateway_tools: pydo.operations.GatewayToolsOperations
:ivar gateway_code: GatewayCodeOperations operations
:vartype gateway_code: pydo.operations.GatewayCodeOperations
:ivar gateway_session_approvals: GatewaySessionApprovalsOperations operations
:vartype gateway_session_approvals: pydo.operations.GatewaySessionApprovalsOperations
:ivar gateway_approvals: GatewayApprovalsOperations operations
:vartype gateway_approvals: pydo.operations.GatewayApprovalsOperations
:ivar one_clicks: OneClicksOperations operations
:vartype one_clicks: pydo.operations.OneClicksOperations
:ivar account: AccountOperations operations
Expand All @@ -118,6 +134,8 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype actions: pydo.operations.ActionsOperations
:ivar addons: AddonsOperations operations
:vartype addons: pydo.operations.AddonsOperations
:ivar harness: HarnessOperations operations
:vartype harness: pydo.operations.HarnessOperations
:ivar apps: AppsOperations operations
:vartype apps: pydo.operations.AppsOperations
:ivar cdn: CdnOperations operations
Expand Down Expand Up @@ -160,10 +178,16 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype image_actions: pydo.operations.ImageActionsOperations
:ivar insights: InsightsOperations operations
:vartype insights: pydo.operations.InsightsOperations
:ivar signals: SignalsOperations operations
:vartype signals: pydo.operations.SignalsOperations
:ivar kubernetes: KubernetesOperations operations
:vartype kubernetes: pydo.operations.KubernetesOperations
:ivar load_balancers: LoadBalancersOperations operations
:vartype load_balancers: pydo.operations.LoadBalancersOperations
:ivar microvms: MicrovmsOperations operations
:vartype microvms: pydo.operations.MicrovmsOperations
:ivar microvm_checkpoints: MicrovmCheckpointsOperations operations
:vartype microvm_checkpoints: pydo.operations.MicrovmCheckpointsOperations
:ivar monitoring: MonitoringOperations operations
:vartype monitoring: pydo.operations.MonitoringOperations
:ivar nfs: NfsOperations operations
Expand Down Expand Up @@ -294,6 +318,18 @@ def __init__(
self.users = UsersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_tools = GatewayToolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_code = GatewayCodeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_session_approvals = GatewaySessionApprovalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_approvals = GatewayApprovalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.one_clicks = OneClicksOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -309,6 +345,9 @@ def __init__(
self.addons = AddonsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.harness = HarnessOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.apps = AppsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -372,12 +411,21 @@ def __init__(
self.insights = InsightsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.signals = SignalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.kubernetes = KubernetesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.load_balancers = LoadBalancersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.microvms = MicrovmsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.microvm_checkpoints = MicrovmCheckpointsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.monitoring = MonitoringOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
38 changes: 38 additions & 0 deletions src/pydo/_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Optional

from azure.core import MatchConditions


def raise_if_not_implemented(cls, abstract_methods):
not_implemented = [
Expand All @@ -15,3 +19,37 @@ def raise_if_not_implemented(cls, abstract_methods):
cls.__name__, "', '".join(not_implemented)
)
)


def quote_etag(etag: Optional[str]) -> Optional[str]:
if not etag or etag == "*":
return etag
if etag.startswith("W/"):
return etag
if etag.startswith('"') and etag.endswith('"'):
return etag
if etag.startswith("'") and etag.endswith("'"):
return etag
return '"' + etag + '"'


def prep_if_match(
etag: Optional[str], match_condition: Optional[MatchConditions]
) -> Optional[str]:
if match_condition == MatchConditions.IfNotModified:
if_match = quote_etag(etag) if etag else None
return if_match
if match_condition == MatchConditions.IfPresent:
return "*"
return None


def prep_if_none_match(
etag: Optional[str], match_condition: Optional[MatchConditions]
) -> Optional[str]:
if match_condition == MatchConditions.IfModified:
if_none_match = quote_etag(etag) if etag else None
return if_none_match
if match_condition == MatchConditions.IfMissing:
return "*"
return None
48 changes: 48 additions & 0 deletions src/pydo/aio/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@
FirewallsOperations,
FunctionsAccessKeyOperations,
FunctionsOperations,
GatewayApprovalsOperations,
GatewayCodeOperations,
GatewaySessionApprovalsOperations,
GatewayToolsOperations,
GenaiOperations,
HarnessOperations,
ImageActionsOperations,
ImagesOperations,
InferenceOperations,
Expand All @@ -45,6 +50,8 @@
KubernetesOperations,
LoadBalancersOperations,
McpServersOperations,
MicrovmCheckpointsOperations,
MicrovmsOperations,
MonitoringOperations,
NfsOperations,
OneClicksOperations,
Expand All @@ -63,6 +70,7 @@
ReservedIPv6Operations,
SecurityOperations,
SessionsOperations,
SignalsOperations,
SizesOperations,
SnapshotsOperations,
SpacesKeyOperations,
Expand Down Expand Up @@ -108,6 +116,14 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype tools: pydo.aio.operations.ToolsOperations
:ivar users: UsersOperations operations
:vartype users: pydo.aio.operations.UsersOperations
:ivar gateway_tools: GatewayToolsOperations operations
:vartype gateway_tools: pydo.aio.operations.GatewayToolsOperations
:ivar gateway_code: GatewayCodeOperations operations
:vartype gateway_code: pydo.aio.operations.GatewayCodeOperations
:ivar gateway_session_approvals: GatewaySessionApprovalsOperations operations
:vartype gateway_session_approvals: pydo.aio.operations.GatewaySessionApprovalsOperations
:ivar gateway_approvals: GatewayApprovalsOperations operations
:vartype gateway_approvals: pydo.aio.operations.GatewayApprovalsOperations
:ivar one_clicks: OneClicksOperations operations
:vartype one_clicks: pydo.aio.operations.OneClicksOperations
:ivar account: AccountOperations operations
Expand All @@ -118,6 +134,8 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype actions: pydo.aio.operations.ActionsOperations
:ivar addons: AddonsOperations operations
:vartype addons: pydo.aio.operations.AddonsOperations
:ivar harness: HarnessOperations operations
:vartype harness: pydo.aio.operations.HarnessOperations
:ivar apps: AppsOperations operations
:vartype apps: pydo.aio.operations.AppsOperations
:ivar cdn: CdnOperations operations
Expand Down Expand Up @@ -160,10 +178,16 @@ class GeneratedClient: # pylint: disable=client-accepts-api-version-keyword,too
:vartype image_actions: pydo.aio.operations.ImageActionsOperations
:ivar insights: InsightsOperations operations
:vartype insights: pydo.aio.operations.InsightsOperations
:ivar signals: SignalsOperations operations
:vartype signals: pydo.aio.operations.SignalsOperations
:ivar kubernetes: KubernetesOperations operations
:vartype kubernetes: pydo.aio.operations.KubernetesOperations
:ivar load_balancers: LoadBalancersOperations operations
:vartype load_balancers: pydo.aio.operations.LoadBalancersOperations
:ivar microvms: MicrovmsOperations operations
:vartype microvms: pydo.aio.operations.MicrovmsOperations
:ivar microvm_checkpoints: MicrovmCheckpointsOperations operations
:vartype microvm_checkpoints: pydo.aio.operations.MicrovmCheckpointsOperations
:ivar monitoring: MonitoringOperations operations
:vartype monitoring: pydo.aio.operations.MonitoringOperations
:ivar nfs: NfsOperations operations
Expand Down Expand Up @@ -294,6 +318,18 @@ def __init__(
self.users = UsersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_tools = GatewayToolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_code = GatewayCodeOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_session_approvals = GatewaySessionApprovalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.gateway_approvals = GatewayApprovalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.one_clicks = OneClicksOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -309,6 +345,9 @@ def __init__(
self.addons = AddonsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.harness = HarnessOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.apps = AppsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -372,12 +411,21 @@ def __init__(
self.insights = InsightsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.signals = SignalsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.kubernetes = KubernetesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.load_balancers = LoadBalancersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.microvms = MicrovmsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.microvm_checkpoints = MicrovmCheckpointsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.monitoring = MonitoringOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
38 changes: 38 additions & 0 deletions src/pydo/aio/_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Optional

from azure.core import MatchConditions


def raise_if_not_implemented(cls, abstract_methods):
not_implemented = [
Expand All @@ -15,3 +19,37 @@ def raise_if_not_implemented(cls, abstract_methods):
cls.__name__, "', '".join(not_implemented)
)
)


def quote_etag(etag: Optional[str]) -> Optional[str]:
if not etag or etag == "*":
return etag
if etag.startswith("W/"):
return etag
if etag.startswith('"') and etag.endswith('"'):
return etag
if etag.startswith("'") and etag.endswith("'"):
return etag
return '"' + etag + '"'


def prep_if_match(
etag: Optional[str], match_condition: Optional[MatchConditions]
) -> Optional[str]:
if match_condition == MatchConditions.IfNotModified:
if_match = quote_etag(etag) if etag else None
return if_match
if match_condition == MatchConditions.IfPresent:
return "*"
return None


def prep_if_none_match(
etag: Optional[str], match_condition: Optional[MatchConditions]
) -> Optional[str]:
if match_condition == MatchConditions.IfModified:
if_none_match = quote_etag(etag) if etag else None
return if_none_match
if match_condition == MatchConditions.IfMissing:
return "*"
return None
Loading
Loading