-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathservice_plan_visibilities.py
More file actions
26 lines (19 loc) · 1 KB
/
service_plan_visibilities.py
File metadata and controls
26 lines (19 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from typing import TYPE_CHECKING
from cloudfoundry_client.v2.entities import EntityManager, Entity
if TYPE_CHECKING:
from cloudfoundry_client.client import CloudFoundryClient
class ServicePlanVisibilityManager(EntityManager):
def __init__(self, target_endpoint: str, client: "CloudFoundryClient"):
super().__init__(target_endpoint, client, "/v2/service_plan_visibilities")
def create(self, service_plan_guid: str, organization_guid: str) -> Entity:
request = self._request()
request["service_plan_guid"] = service_plan_guid
request["organization_guid"] = organization_guid
return super()._create(request)
def update(self, spv_guid: str, service_plan_guid: str, organization_guid: str) -> Entity:
request = self._request()
request["service_plan_guid"] = service_plan_guid
request["organization_guid"] = organization_guid
return super()._update(spv_guid, request)
def remove(self, spv_guid: str):
super()._remove(spv_guid)