AppController remove hard-coded infrastructure checks
@@ -2840,11 +2840,8 @@ class Djinn
# Next, find out this machine's public IP address. In a cloud deployment, we
# have to rely on the metadata server, while in a cluster deployment, it's
# the same as the private IP.
- if ["ec2", "euca", "gce"].include?(@options['infrastructure'])
new_public_ip = HelperFunctions.get_public_ip_from_metadata_service
- else
- new_public_ip = new_private_ip
- end
+ new_public_ip = new_private_ip if new_public_ip.nil?
# Finally, replace anywhere that the old public or private IP addresses were
# used with the new one.
@@ -3601,8 +3598,9 @@ class Djinn
Djinn.log_info("Done stopping groomer service.")
end
+ # Cloud if infrastructure is configured
def is_cloud?
- return ['ec2', 'euca', 'gce', 'azure'].include?(@options['infrastructure'])
+ return /^[a-zA-Z0-9_-]{3,}$/.match?(@options['infrastructure'])
end
def update_python_package(target, pip="pip")
