Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit b3839a9

Browse files
authored
Subaccount enable beta features (#343)
* add support of beta features * change default to false for beta features
1 parent 96977d8 commit b3839a9

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

config/templates/libs/BTPSA-PARAMETERS.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
"title": "list of environment variables on OS level to be used within commands defined in the `executeBeforeAccountSetup` and `executeAfterAccountSetup`.",
157157
"default": null
158158
},
159+
"subaccountenablebeta": {
160+
"type": "boolean",
161+
"description": "if set to true, a newly create subaccount will have beta features enabled",
162+
"title": "enable beta features in new subaccount",
163+
"default": false
164+
},
159165
"fallbackserviceplan": {
160166
"type": [
161167
"string",

libs/btpsa-parameters.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@
156156
"title": "list of environment variables on OS level to be used within commands defined in the `executeBeforeAccountSetup` and `executeAfterAccountSetup`.",
157157
"default": null
158158
},
159+
"subaccountenablebeta": {
160+
"type": "boolean",
161+
"description": "if set to true, a newly create subaccount will have beta features enabled",
162+
"title": "enable beta features in new subaccount",
163+
"default": false
164+
},
159165
"fallbackserviceplan": {
160166
"type": [
161167
"string",

libs/python/btp_cli.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def create_directory(self):
153153
if self.directorylabels is not None:
154154
labelsAsString = json.dumps(self.subaccountlabels)
155155
command += " --labels '" + labelsAsString + "'"
156-
156+
157157
message = "Create directory >" + directory + "<"
158158

159159
result = runCommandAndGetJsonResult(
@@ -333,10 +333,13 @@ def create_subaccount(self):
333333
--region '" + usecaseRegion + "' \
334334
--subaccount-admins '" + subaccountadmins + "'"
335335

336+
if self.subaccountenablebeta is True:
337+
command += " --beta-enabled"
338+
336339
if self.subaccountlabels is not None:
337340
labelsAsString = json.dumps(self.subaccountlabels)
338341
command += " --labels '" + labelsAsString + "'"
339-
342+
340343
message = "Create sub account >" + subaccount + "<"
341344

342345
if directoryid is not None and directoryid != "":

0 commit comments

Comments
 (0)