Skip to content

Commit

Permalink
Remove "generate_ssh_key" parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Sep 20, 2024
1 parent 0f97003 commit 42aa425
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 42 deletions.
5 changes: 2 additions & 3 deletions mchub/models/magic_castle/magic_castle_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"source",
"config_git_url",
"config_version",
"generate_ssh_key",
# Legacy fields
"puppetenv_rev",
]
Expand Down Expand Up @@ -82,15 +81,15 @@ def update_main_file(self, filename):
"module": {
"openstack": {
"source": MAGIC_CASTLE_SOURCE["openstack"],
"generate_ssh_key": True,
"config_git_url": MAGIC_CASTLE_PUPPET_CONFIGURATION_URL,
"config_version": MAGIC_CASTLE_VERSION,
**self.to_dict(),
}
},
}
main_tf_configuration["module"].update(
DnsManager(self._configuration["domain"]).get_magic_castle_configuration()
DnsManager(self._configuration["domain"]
).get_magic_castle_configuration()
)

with open(filename, "w") as main_terraform_file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "/home/mcu/magic_castle-openstack-11.8/openstack",
"generate_ssh_key": true,
"puppetenv_rev": "11.8",
"cluster_name": "buildplanning",
"domain": "calculquebec.cloud",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "created",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3402,9 +3402,6 @@
"domain": {
"constant_value": "calculquebec.cloud"
},
"generate_ssh_key": {
"constant_value": true
},
"guest_passwd": {
"constant_value": "password-123"
},
Expand Down Expand Up @@ -4287,11 +4284,6 @@
"var.config_version"
]
},
"generate_ssh_key": {
"references": [
"var.generate_ssh_key"
]
},
"instances": {
"references": [
"module.design.instances",
Expand Down Expand Up @@ -4394,16 +4386,13 @@
},
"schema_version": 0,
"count_expression": {
"references": [
"var.generate_ssh_key"
]
"references": []
}
}
],
"variables": {
"config_git_url": {},
"config_version": {},
"generate_ssh_key": {},
"instances": {},
"public_keys": {},
"puppetserver_ip": {},
Expand Down Expand Up @@ -4472,10 +4461,6 @@
],
"description": "List of login external firewall rules defined as map of 5 values name, from_port, to_port, ip_protocol and cidr"
},
"generate_ssh_key": {
"default": false,
"description": "If set to true, Terraform will generate an ssh key pair to connect to the cluster. Default: false"
},
"guest_passwd": {
"default": "",
"description": "Guest accounts common password. If left blank, the password is randomly generated."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "empty-state",
Expand Down
1 change: 0 additions & 1 deletion tests/mock-clusters/missingfloatingips.c3.ca/main.tf.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "missingfloatingips",
Expand Down
17 changes: 1 addition & 16 deletions tests/mock-clusters/missingfloatingips.c3.ca/terraform_plan.json
Original file line number Diff line number Diff line change
Expand Up @@ -2836,9 +2836,6 @@
"domain": {
"constant_value": "c3.ca"
},
"generate_ssh_key": {
"constant_value": true
},
"guest_passwd": {
"constant_value": "password-123"
},
Expand Down Expand Up @@ -3721,11 +3718,6 @@
"var.config_version"
]
},
"generate_ssh_key": {
"references": [
"var.generate_ssh_key"
]
},
"instances": {
"references": [
"module.design.instances",
Expand Down Expand Up @@ -3828,16 +3820,13 @@
},
"schema_version": 0,
"count_expression": {
"references": [
"var.generate_ssh_key"
]
"references": []
}
}
],
"variables": {
"config_git_url": {},
"config_version": {},
"generate_ssh_key": {},
"instances": {},
"public_keys": {},
"puppetserver_ip": {},
Expand Down Expand Up @@ -3906,10 +3895,6 @@
],
"description": "List of login external firewall rules defined as map of 5 values name, from_port, to_port, ip_protocol and cidr"
},
"generate_ssh_key": {
"default": false,
"description": "If set to true, Terraform will generate an ssh key pair to connect to the cluster. Default: false"
},
"guest_passwd": {
"default": "",
"description": "Guest accounts common password. If left blank, the password is randomly generated."
Expand Down
1 change: 0 additions & 1 deletion tests/mock-clusters/missingnodes.c3.ca/main.tf.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "missingnodes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "noowner",
Expand Down
1 change: 0 additions & 1 deletion tests/mock-clusters/valid1.calculquebec.cloud/main.tf.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": {
"openstack": {
"source": "git::https://github.com/ComputeCanada/magic_castle.git//openstack?ref=11.8",
"generate_ssh_key": true,
"config_git_url": "https://github.com/ComputeCanada/puppet-magic_castle.git",
"config_version": "11.8",
"cluster_name": "valid1",
Expand Down

0 comments on commit 42aa425

Please sign in to comment.