@@ -56,6 +56,15 @@ def create_deployment(self, deployment_id, service_id, infra_id, version):
5656 self .client ._perform_json ("POST" , "/api-deployer/deployments" , body = settings )
5757 return self .get_deployment (deployment_id )
5858
59+ def list_stages (self ):
60+ """
61+ Lists infrastructure stages of the API Deployer
62+
63+ :rtype: a list of dict. Each dict contains a field "id" for the stage identifier and "desc" for its description.
64+ :rtype: list
65+ """
66+ return self .client ._perform_json ("GET" , "/api-deployer/stages" )
67+
5968 def list_infras (self , as_objects = True ):
6069 """
6170 Lists deployment infrastructures on the API Deployer
@@ -332,6 +341,7 @@ def save(self):
332341 "PUT" , "/api-deployer/deployments/%s/settings" % (self .deployment_id ),
333342 body = self .settings )
334343
344+
335345class DSSAPIDeployerDeploymentStatus (object ):
336346 """The status of an API Deployer deployment.
337347
@@ -387,7 +397,6 @@ def get_health_messages(self):
387397 return self .heavy_status ["healthMessages" ]
388398
389399
390-
391400###############################################
392401# Published Service
393402###############################################
@@ -440,6 +449,15 @@ def get_settings(self):
440449
441450 return DSSAPIDeployerServiceSettings (self .client , self .service_id , settings )
442451
452+ def delete (self ):
453+ """
454+ Deletes this service
455+
456+ You may only delete a service if it has no deployments on it anymore.
457+ """
458+ return self .client ._perform_empty (
459+ "DELETE" , "/api-deployer/services/%s" % (self .service_id ))
460+
443461
444462class DSSAPIDeployerServiceSettings (object ):
445463 """The settings of an API Deployer Service.
@@ -466,6 +484,7 @@ def save(self):
466484 "PUT" , "/api-deployer/services/%s/settings" % (self .service_id ),
467485 body = self .settings )
468486
487+
469488class DSSAPIDeployerServiceStatus (object ):
470489 """The status of an API Deployer Service.
471490
0 commit comments