Skip to content

Commit

Permalink
fix: change choice to enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Mehant Kammakomati <[email protected]>
  • Loading branch information
kmehant committed Sep 22, 2022
1 parent b028dd6 commit a07fa12
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom-vpc-contract-encrypter/vpccontractencrypter.star
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def transform(new_artifacts, old_artifacts):
for new_artifact in new_artifacts:
data = {}
if "envType" in new_artifact["configs"]["VpcContractSec"].keys():
envPass = m2k.query({"id": "move2kube.ibmvpc.env.password", "type": "Input", "description": "Enter the password for encryption of env(Private Key) : ", "hint": ["If ignored, encrypted contract file would be empty"], "default": ""})
envPass = m2k.query({"id": "move2kube.ibmvpc.env.password", "type": "Password", "description": "Enter the password for encryption of env(Private Key) : ", "hint": ["If ignored, encrypted contract file would be empty"], "default": ""})
envData = fs.read(fs.path_join(new_artifact["paths"]["VpcContract"][0], 'env.yaml'))
data["EnvData"] = envData
data["EnvPass"] = envPass
if "workloadType" in new_artifact["configs"]["VpcContractSec"].keys():
workloadPass = m2k.query({"id": "move2kube.ibmvpc.workload.password", "type": "Input", "description": "Enter the password for encryption of workload (Private Key) : ", "hint": ["If ignored, encrypted contract file would be empty"], "default": ""})
workloadPass = m2k.query({"id": "move2kube.ibmvpc.workload.password", "type": "Password", "description": "Enter the password for encryption of workload (Private Key) : ", "hint": ["If ignored, encrypted contract file would be empty"], "default": ""})
workloadData = fs.read(fs.path_join(new_artifact["paths"]["VpcContract"][0], 'workload.yaml'))
data["WorkloadData"] = workloadData
data["WorkloadPass"] = workloadPass
Expand Down
2 changes: 1 addition & 1 deletion custom-vpc-contract-generator/vpccontractgenerator.star
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def transform(new_artifacts, old_artifacts):
artifacts = []

## Q&A to fill the contract file
usesVPC = m2k.query({"id": "move2kube.ibmvpc.choice", "type": "Select", "description": "Do you use IBM VPC?", "hints": ["A VPC contract file will be created."], "options": ["Yes", "No"]})
usesVPC = m2k.query({"id": "move2kube.ibmvpc.enabled", "type": "Select", "description": "Do you use IBM VPC?", "hints": ["A VPC contract file will be created."], "options": ["Yes", "No"]})
if usesVPC == "No":
return {'pathMappings': pathMappings, 'artifacts': artifacts}

Expand Down
59 changes: 59 additions & 0 deletions input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
docker.com:

password

Abhi@2022

username

abhiramk

docker.io/abhiramk/sshcontainer

notary

https://notary.docker.io

publicKey

LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJoekNDQVMyZ0F3SUJBZ0lRS0phV2Q1OU11aXhvVnFKQkhvenVHREFLQmdncWhrak9QUVFEQWpBcU1TZ3cKSmdZRFZRUURFeDlrYjJOclpYSXVhVzh2WVdKb2FYSmhiV3N2YzNOb1kyOXVkR0ZwYm1WeU1CNFhEVEl5TURZdwpPVEExTlRNeE1Gb1hEVE15TURZd05qQTFOVE14TUZvd0tqRW9NQ1lHQTFVRUF4TWZaRzlqYTJWeUxtbHZMMkZpCmFHbHlZVzFyTDNOemFHTnZiblJoYVc1bGNqQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJLZzIKVkk0U0R4ci9MbjdSMlpvYWpZSmZWblpOMHhuYXAvdGhHdUV0cU5TSmxGVkVEdEpKRzYxVXFkbmk5TnRETnNsaApaeTJmeVVvQ2JQcmtXQ1JiVWtXak5UQXpNQTRHQTFVZER3RUIvd1FFQXdJRm9EQVRCZ05WSFNVRUREQUtCZ2dyCkJnRUZCUWNEQXpBTUJnTlZIUk1CQWY4RUFqQUFNQW9HQ0NxR1NNNDlCQU1DQTBnQU1FVUNJQ2hpWkl0cWo2SHQKVFNpSVZSMk9oSVVTTTh0b3l1NUN6VXphaE9iUlNSKzlBaUVBNjFuZGFZa2hKTlRwcjFPcWZ0cmkvcFhibndqRQpDdlpQNEhUd3l2ajlRYXM9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K

volume name

test

mount

/mnt/data

seed

test

filesystem

xfs

env

key value

logDNAhostname

syslog-a.au-syd.logging.cloud.ibm.com

ingestionKey

bc8a5ba9aa5c0c12b26c6c45089228a4

port

6514

volume name

test

seed

test

0 comments on commit a07fa12

Please sign in to comment.