Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
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
22 changes: 22 additions & 0 deletions google/cloud/deploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
CloudDeployAsyncClient,
)

from google.cloud.deploy_v1.types.cloud_deploy import AnthosCluster
from google.cloud.deploy_v1.types.cloud_deploy import ApproveRolloutRequest
from google.cloud.deploy_v1.types.cloud_deploy import ApproveRolloutResponse
from google.cloud.deploy_v1.types.cloud_deploy import BuildArtifact
Expand Down Expand Up @@ -60,10 +61,25 @@
from google.cloud.deploy_v1.types.cloud_deploy import TargetsPresentCondition
from google.cloud.deploy_v1.types.cloud_deploy import UpdateDeliveryPipelineRequest
from google.cloud.deploy_v1.types.cloud_deploy import UpdateTargetRequest
from google.cloud.deploy_v1.types.deliverypipeline_notification_payload import (
DeliveryPipelineNotificationEvent,
)
from google.cloud.deploy_v1.types.log_enums import Type
from google.cloud.deploy_v1.types.release_notification_payload import (
ReleaseNotificationEvent,
)
from google.cloud.deploy_v1.types.release_render_payload import ReleaseRenderEvent
from google.cloud.deploy_v1.types.rollout_notification_payload import (
RolloutNotificationEvent,
)
from google.cloud.deploy_v1.types.target_notification_payload import (
TargetNotificationEvent,
)

__all__ = (
"CloudDeployClient",
"CloudDeployAsyncClient",
"AnthosCluster",
"ApproveRolloutRequest",
"ApproveRolloutResponse",
"BuildArtifact",
Expand Down Expand Up @@ -105,4 +121,10 @@
"TargetsPresentCondition",
"UpdateDeliveryPipelineRequest",
"UpdateTargetRequest",
"DeliveryPipelineNotificationEvent",
"Type",
"ReleaseNotificationEvent",
"ReleaseRenderEvent",
"RolloutNotificationEvent",
"TargetNotificationEvent",
)
16 changes: 16 additions & 0 deletions google/cloud/deploy_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .services.cloud_deploy import CloudDeployClient
from .services.cloud_deploy import CloudDeployAsyncClient

from .types.cloud_deploy import AnthosCluster
from .types.cloud_deploy import ApproveRolloutRequest
from .types.cloud_deploy import ApproveRolloutResponse
from .types.cloud_deploy import BuildArtifact
Expand Down Expand Up @@ -58,9 +59,18 @@
from .types.cloud_deploy import TargetsPresentCondition
from .types.cloud_deploy import UpdateDeliveryPipelineRequest
from .types.cloud_deploy import UpdateTargetRequest
from .types.deliverypipeline_notification_payload import (
DeliveryPipelineNotificationEvent,
)
from .types.log_enums import Type
from .types.release_notification_payload import ReleaseNotificationEvent
from .types.release_render_payload import ReleaseRenderEvent
from .types.rollout_notification_payload import RolloutNotificationEvent
from .types.target_notification_payload import TargetNotificationEvent

__all__ = (
"CloudDeployAsyncClient",
"AnthosCluster",
"ApproveRolloutRequest",
"ApproveRolloutResponse",
"BuildArtifact",
Expand All @@ -74,6 +84,7 @@
"DeleteDeliveryPipelineRequest",
"DeleteTargetRequest",
"DeliveryPipeline",
"DeliveryPipelineNotificationEvent",
"ExecutionConfig",
"GetConfigRequest",
"GetDeliveryPipelineRequest",
Expand All @@ -94,13 +105,18 @@
"PipelineReadyCondition",
"PrivatePool",
"Release",
"ReleaseNotificationEvent",
"ReleaseRenderEvent",
"Rollout",
"RolloutNotificationEvent",
"SerialPipeline",
"SkaffoldVersion",
"Stage",
"Target",
"TargetArtifact",
"TargetNotificationEvent",
"TargetsPresentCondition",
"Type",
"UpdateDeliveryPipelineRequest",
"UpdateTargetRequest",
)
2 changes: 2 additions & 0 deletions google/cloud/deploy_v1/services/cloud_deploy/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class CloudDeployAsyncClient:
parse_delivery_pipeline_path = staticmethod(
CloudDeployClient.parse_delivery_pipeline_path
)
membership_path = staticmethod(CloudDeployClient.membership_path)
parse_membership_path = staticmethod(CloudDeployClient.parse_membership_path)
release_path = staticmethod(CloudDeployClient.release_path)
parse_release_path = staticmethod(CloudDeployClient.parse_release_path)
rollout_path = staticmethod(CloudDeployClient.rollout_path)
Expand Down
24 changes: 24 additions & 0 deletions google/cloud/deploy_v1/services/cloud_deploy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,30 @@ def parse_delivery_pipeline_path(path: str) -> Dict[str, str]:
)
return m.groupdict() if m else {}

@staticmethod
def membership_path(
project: str,
location: str,
membership: str,
) -> str:
"""Returns a fully-qualified membership string."""
return (
"projects/{project}/locations/{location}/memberships/{membership}".format(
project=project,
location=location,
membership=membership,
)
)

@staticmethod
def parse_membership_path(path: str) -> Dict[str, str]:
"""Parses a membership path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/memberships/(?P<membership>.+?)$",
path,
)
return m.groupdict() if m else {}

@staticmethod
def release_path(
project: str,
Expand Down
23 changes: 23 additions & 0 deletions google/cloud/deploy_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
#
from .cloud_deploy import (
AnthosCluster,
ApproveRolloutRequest,
ApproveRolloutResponse,
BuildArtifact,
Expand Down Expand Up @@ -56,8 +57,24 @@
UpdateDeliveryPipelineRequest,
UpdateTargetRequest,
)
from .deliverypipeline_notification_payload import (
DeliveryPipelineNotificationEvent,
)
from .release_notification_payload import (
ReleaseNotificationEvent,
)
from .release_render_payload import (
ReleaseRenderEvent,
)
from .rollout_notification_payload import (
RolloutNotificationEvent,
)
from .target_notification_payload import (
TargetNotificationEvent,
)

__all__ = (
"AnthosCluster",
"ApproveRolloutRequest",
"ApproveRolloutResponse",
"BuildArtifact",
Expand Down Expand Up @@ -99,4 +116,10 @@
"TargetsPresentCondition",
"UpdateDeliveryPipelineRequest",
"UpdateTargetRequest",
"DeliveryPipelineNotificationEvent",
"Type",
"ReleaseNotificationEvent",
"ReleaseRenderEvent",
"RolloutNotificationEvent",
"TargetNotificationEvent",
)
Loading