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 1f7d91c
Show file tree
Hide file tree
Showing 2 changed files with 3 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

0 comments on commit 1f7d91c

Please sign in to comment.