@@ -70,12 +70,29 @@ def list_infras(self, as_objects = True):
70
70
else :
71
71
return l
72
72
73
+ def create_infra (self , infra_id , stage , type ):
74
+ """
75
+ Creates a new infrastructure on the API Deployer and returns the handle to interact with it.
76
+
77
+ :param str infra_id: Unique Identifier of the infra to create
78
+ :param str stage: Infrastructure stage. Stages are configurable on each API Deployer
79
+ :param str type: STATIC or KUBERNETES
80
+ :rtype: :class:`DSSAPIDeployerInfra`
81
+ """
82
+ settings = {
83
+ "id" : infra_id ,
84
+ "stage" : stage ,
85
+ "type" : type ,
86
+ }
87
+ self .client ._perform_json ("POST" , "/api-deployer/infras" , body = settings )
88
+ return self .get_infra (infra_id )
89
+
73
90
def get_infra (self , infra_id ):
74
91
"""
75
92
Returns a handle to interact with a single deployment infra, as a :class:`DSSAPIDeployerInfra`
76
93
77
94
:param str infra_id: Identifier of the infra to get
78
- :rtype: :class:`DSSAPIDeployerDeployment `
95
+ :rtype: :class:`DSSAPIDeployerInfra `
79
96
"""
80
97
return DSSAPIDeployerInfra (self .client , infra_id )
81
98
@@ -453,4 +470,4 @@ def get_raw(self):
453
470
Gets the raw status information. This returns a dictionary with various information about the service,
454
471
:rtype: dict
455
472
"""
456
- return self .light_status
473
+ return self .light_status
0 commit comments