Skip to content

Commit 0c1ae1e

Browse files
committed
feat(apps): Update calls to _list
1 parent f0aa705 commit 0c1ae1e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cloudfoundry_client/v3/apps.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING, Optional
22

3-
from cloudfoundry_client.common_objects import JsonObject
4-
from cloudfoundry_client.v3.entities import EntityManager
3+
from cloudfoundry_client.common_objects import JsonObject, Pagination
4+
from cloudfoundry_client.v3.entities import EntityManager, Entity
55

66
if TYPE_CHECKING:
77
from cloudfoundry_client.client import CloudFoundryClient
@@ -27,3 +27,11 @@ def get_routes(self, application_guid: str) -> JsonObject:
2727

2828
def get_manifest(self, application_guid: str) -> str:
2929
return self.client.get(url="%s%s/%s/manifest" % (self.target_endpoint, self.entity_uri, application_guid)).text
30+
31+
def get_revisions(self, application_guid: str,**kwargs) -> Pagination[Entity]:
32+
uri: str = "%s/%s/revisions" % (self.entity_uri, application_guid)
33+
return super(AppManager,self)._list(requested_path=uri, **kwargs)
34+
35+
def get_deployed_revisions(self, application_guid: str,**kwargs) -> Pagination[Entity]:
36+
uri: str = "%s/%s/revisions/deployed" % (self.entity_uri, application_guid)
37+
return super(AppManager,self)._list(requested_path=uri, **kwargs)

0 commit comments

Comments
 (0)