From 03d43d399ce79ed7f5d19ec33c5dd9fe273c8712 Mon Sep 17 00:00:00 2001 From: Alejandro Huertas Herrero Date: Fri, 17 Sep 2021 09:51:14 +0200 Subject: [PATCH] F #5474: rename Packet to Equinix (#1465) * rename Packet to Equinix in provision * rename packet to equinix in fireedge files * Update fireedge.d in provision templates Co-authored-by: Sergio Betanzos --- install.sh | 114 +++++++++--------- share/etc/oned.conf | 12 +- share/linters/.rubocop.yml | 28 ++--- .../ansible/{packet.yml => equinix.yml} | 0 .../equinix-ams1.yml} | 12 +- .../equinix-ewr1.yml} | 12 +- .../equinix-nrt1.yml} | 12 +- .../equinix-sjc1.yml} | 12 +- .../metal/provisions/common.d/hosts.yml | 2 +- .../{packet.d => equinix.d}/datastores.yml | 0 .../{packet.d => equinix.d}/fireedge.yml | 3 +- .../{packet.d => equinix.d}/inputs.yml | 8 +- .../{packet.d => equinix.d}/networks.yml | 4 +- .../provisions/{packet.yml => equinix.yml} | 22 ++-- .../onprem/provisions/onprem.d/hosts.yml | 2 +- .../provisions/digitalocean.d/fireedge.yml | 1 - .../virtual/provisions/vultr.d/fireedge.yml | 1 - src/cli/oneprovider | 16 --- .../providers.d/{packet.yaml => equinix.yaml} | 2 +- .../remotes/common.d/monitord-client.rb | 2 +- .../beacon/monitord-client-shepherd_local.sh | 0 .../host/monitor/probe_host_monitor.rb | 6 +- .../host/system/probe_host_system.rb | 6 +- .../vm/monitor/probe_vm_monitor.rb | 6 +- .../vm/status/probe_vm_status.rb | 4 +- .../monitord-client.rb | 0 .../monitord-client_control.sh | 0 .../{packet.d => equinix.d}/version.sh | 0 .../{packet => equinix}/allocate_address | 0 .../remotes/{packet => equinix}/free_address | 0 .../remotes/{packet => equinix}/get_address | 4 +- .../register_address_range | 24 ++-- .../unregister_address_range | 24 ++-- src/onecfg/share/etc/files.yaml | 2 +- src/oneprovision/lib/provision/ansible.rb | 2 +- .../providers/{packet.rb => equinix.rb} | 4 +- .../templates/{packet => equinix}/cluster.erb | 0 .../{packet => equinix}/datastore.erb | 2 +- .../templates/{packet => equinix}/host.erb | 0 .../templates/{packet => equinix}/network.erb | 0 .../{packet => equinix}/provider.erb | 0 .../remotes/{packet => equinix}/cancel | 6 +- .../remotes/{packet => equinix}/deploy | 8 +- .../equinix_driver.rb} | 80 ++++++------ src/vmm_mad/remotes/{packet => equinix}/poll | 8 +- .../remotes/{packet => equinix}/reboot | 8 +- src/vmm_mad/remotes/{packet => equinix}/reset | 8 +- .../remotes/{packet => equinix}/resize | 0 .../remotes/{packet => equinix}/shutdown | 8 +- src/vnm_mad/remotes/elastic/elastic.rb | 8 +- .../elastic/{packet_vnm.rb => equinix_vnm.rb} | 10 +- 51 files changed, 232 insertions(+), 261 deletions(-) rename share/oneprovision/ansible/{packet.yml => equinix.yml} (100%) rename share/oneprovision/edge-clusters/metal/providers/{packet/packet-ams1.yml => equinix/equinix-ams1.yml} (56%) rename share/oneprovision/edge-clusters/metal/providers/{packet/packet-ewr1.yml => equinix/equinix-ewr1.yml} (62%) rename share/oneprovision/edge-clusters/metal/providers/{packet/packet-nrt1.yml => equinix/equinix-nrt1.yml} (62%) rename share/oneprovision/edge-clusters/metal/providers/{packet/packet-sjc1.yml => equinix/equinix-sjc1.yml} (61%) rename share/oneprovision/edge-clusters/metal/provisions/{packet.d => equinix.d}/datastores.yml (100%) rename share/oneprovision/edge-clusters/metal/provisions/{packet.d => equinix.d}/fireedge.yml (96%) rename share/oneprovision/edge-clusters/metal/provisions/{packet.d => equinix.d}/inputs.yml (92%) rename share/oneprovision/edge-clusters/metal/provisions/{packet.d => equinix.d}/networks.yml (96%) rename share/oneprovision/edge-clusters/metal/provisions/{packet.yml => equinix.yml} (89%) rename src/fireedge/etc/provision/providers.d/{packet.yaml => equinix.yaml} (67%) rename src/im_mad/remotes/{packet-probes.d => equinix-probes.d}/host/beacon/monitord-client-shepherd_local.sh (100%) rename src/im_mad/remotes/{packet-probes.d => equinix-probes.d}/host/monitor/probe_host_monitor.rb (95%) rename src/im_mad/remotes/{packet-probes.d => equinix-probes.d}/host/system/probe_host_system.rb (95%) rename src/im_mad/remotes/{packet-probes.d => equinix-probes.d}/vm/monitor/probe_vm_monitor.rb (95%) rename src/im_mad/remotes/{packet-probes.d => equinix-probes.d}/vm/status/probe_vm_status.rb (97%) rename src/im_mad/remotes/{packet.d => equinix.d}/monitord-client.rb (100%) rename src/im_mad/remotes/{packet.d => equinix.d}/monitord-client_control.sh (100%) rename src/im_mad/remotes/{packet.d => equinix.d}/version.sh (100%) rename src/ipamm_mad/remotes/{packet => equinix}/allocate_address (100%) rename src/ipamm_mad/remotes/{packet => equinix}/free_address (100%) rename src/ipamm_mad/remotes/{packet => equinix}/get_address (97%) rename src/ipamm_mad/remotes/{packet => equinix}/register_address_range (93%) rename src/ipamm_mad/remotes/{packet => equinix}/unregister_address_range (87%) rename src/oneprovision/lib/terraform/providers/{packet.rb => equinix.rb} (97%) rename src/oneprovision/lib/terraform/providers/templates/{packet => equinix}/cluster.erb (100%) rename src/oneprovision/lib/terraform/providers/templates/{packet => equinix}/datastore.erb (82%) rename src/oneprovision/lib/terraform/providers/templates/{packet => equinix}/host.erb (100%) rename src/oneprovision/lib/terraform/providers/templates/{packet => equinix}/network.erb (100%) rename src/oneprovision/lib/terraform/providers/templates/{packet => equinix}/provider.erb (100%) rename src/vmm_mad/remotes/{packet => equinix}/cancel (95%) rename src/vmm_mad/remotes/{packet => equinix}/deploy (91%) rename src/vmm_mad/remotes/{packet/packet_driver.rb => equinix/equinix_driver.rb} (88%) rename src/vmm_mad/remotes/{packet => equinix}/poll (93%) rename src/vmm_mad/remotes/{packet => equinix}/reboot (93%) rename src/vmm_mad/remotes/{packet => equinix}/reset (93%) rename src/vmm_mad/remotes/{packet => equinix}/resize (100%) rename src/vmm_mad/remotes/{packet => equinix}/shutdown (92%) rename src/vnm_mad/remotes/elastic/{packet_vnm.rb => equinix_vnm.rb} (94%) diff --git a/install.sh b/install.sh index 2623bc66ad..a153eb4450 100755 --- a/install.sh +++ b/install.sh @@ -306,7 +306,7 @@ LIB_DIRS="$LIB_LOCATION/ruby \ $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws \ $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google \ $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean \ - $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/packet \ + $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/equinix \ $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal \ $LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual \ $LIB_LOCATION/oneprovision/lib/provision \ @@ -409,13 +409,13 @@ VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/im/one-probes.d/vm/monitor \ $VAR_LOCATION/remotes/im/one-probes.d/vm/status \ $VAR_LOCATION/remotes/im/one-probes.d/vm/snapshot \ - $VAR_LOCATION/remotes/im/packet.d \ - $VAR_LOCATION/remotes/im/packet-probes.d/host/beacon \ - $VAR_LOCATION/remotes/im/packet-probes.d/host/monitor \ - $VAR_LOCATION/remotes/im/packet-probes.d/host/system \ - $VAR_LOCATION/remotes/im/packet-probes.d/vm/monitor \ - $VAR_LOCATION/remotes/im/packet-probes.d/vm/status \ - $VAR_LOCATION/remotes/im/packet-probes.d/vm/snapshot \ + $VAR_LOCATION/remotes/im/equinix.d \ + $VAR_LOCATION/remotes/im/equinix-probes.d/host/beacon \ + $VAR_LOCATION/remotes/im/equinix-probes.d/host/monitor \ + $VAR_LOCATION/remotes/im/equinix-probes.d/host/system \ + $VAR_LOCATION/remotes/im/equinix-probes.d/vm/monitor \ + $VAR_LOCATION/remotes/im/equinix-probes.d/vm/status \ + $VAR_LOCATION/remotes/im/equinix-probes.d/vm/snapshot \ $VAR_LOCATION/remotes/vmm \ $VAR_LOCATION/remotes/vmm/lib \ $VAR_LOCATION/remotes/vmm/kvm \ @@ -425,7 +425,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/vmm/one \ $VAR_LOCATION/remotes/vmm/lxd \ $VAR_LOCATION/remotes/vmm/lxc \ - $VAR_LOCATION/remotes/vmm/packet \ + $VAR_LOCATION/remotes/vmm/equinix \ $VAR_LOCATION/remotes/vmm/firecracker \ $VAR_LOCATION/remotes/vnm \ $VAR_LOCATION/remotes/vnm/802.1Q \ @@ -511,7 +511,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/auth/server_cipher \ $VAR_LOCATION/remotes/auth/dummy \ $VAR_LOCATION/remotes/ipam/dummy \ - $VAR_LOCATION/remotes/ipam/packet \ + $VAR_LOCATION/remotes/ipam/equinix \ $VAR_LOCATION/remotes/ipam/vultr \ $VAR_LOCATION/remotes/ipam/aws" @@ -602,7 +602,7 @@ INSTALL_FILES=( IM_PROBES_EC2_FILES:$VAR_LOCATION/remotes/im/ec2.d IM_PROBES_AZ_FILES:$VAR_LOCATION/remotes/im/az.d IM_PROBES_ONE_FILES:$VAR_LOCATION/remotes/im/one.d - IM_PROBES_PACKET_FILES:$VAR_LOCATION/remotes/im/packet.d + IM_PROBES_EQUINIX_FILES:$VAR_LOCATION/remotes/im/equinix.d IM_PROBES_KVM_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/beacon IM_PROBES_KVM_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/monitor IM_PROBES_KVM_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/kvm-probes.d/host/system @@ -651,11 +651,11 @@ INSTALL_FILES=( IM_PROBES_ONE_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/one-probes.d/host/system IM_PROBES_ONE_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/monitor IM_PROBES_ONE_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/one-probes.d/vm/status - IM_PROBES_PACKET_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/beacon - IM_PROBES_PACKET_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/monitor - IM_PROBES_PACKET_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/host/system - IM_PROBES_PACKET_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/vm/monitor - IM_PROBES_PACKET_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/packet-probes.d/vm/status + IM_PROBES_EQUINIX_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/beacon + IM_PROBES_EQUINIX_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/monitor + IM_PROBES_EQUINIX_HOST_SYSTEM_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/host/system + IM_PROBES_EQUINIX_VM_MONITOR_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/vm/monitor + IM_PROBES_EQUINIX_VM_STATUS_FILES:$VAR_LOCATION/remotes/im/equinix-probes.d/vm/status IM_PROBES_VERSION:$VAR_LOCATION/remotes IM_PROBES_FIRECRACKER_HOST_BEACON_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/beacon IM_PROBES_FIRECRACKER_HOST_MONITOR_FILES:$VAR_LOCATION/remotes/im/firecracker-probes.d/host/monitor @@ -690,7 +690,7 @@ INSTALL_FILES=( VMM_EXEC_EC2_SCRIPTS:$VAR_LOCATION/remotes/vmm/ec2 VMM_EXEC_AZ_SCRIPTS:$VAR_LOCATION/remotes/vmm/az VMM_EXEC_ONE_SCRIPTS:$VAR_LOCATION/remotes/vmm/one - VMM_EXEC_PACKET_SCRIPTS:$VAR_LOCATION/remotes/vmm/packet + VMM_EXEC_EQUINIX_SCRIPTS:$VAR_LOCATION/remotes/vmm/equinix TM_FILES:$VAR_LOCATION/remotes/tm TM_SHARED_FILES:$VAR_LOCATION/remotes/tm/shared TM_FS_LVM_FILES:$VAR_LOCATION/remotes/tm/fs_lvm @@ -724,7 +724,7 @@ INSTALL_FILES=( MARKETPLACE_DRIVER_DH_SCRIPTS:$VAR_LOCATION/remotes/market/dockerhub MARKETPLACE_DRIVER_REGISTRY_SCRIPTS:$VAR_LOCATION/remotes/market/docker_registry IPAM_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/ipam/dummy - IPAM_DRIVER_PACKET_SCRIPTS:$VAR_LOCATION/remotes/ipam/packet + IPAM_DRIVER_EQUINIX_SCRIPTS:$VAR_LOCATION/remotes/ipam/equinix IPAM_DRIVER_VULTR_SCRIPTS:$VAR_LOCATION/remotes/ipam/vultr IPAM_DRIVER_EC2_SCRIPTS:$VAR_LOCATION/remotes/ipam/aws NETWORK_FILES:$VAR_LOCATION/remotes/vnm @@ -802,7 +802,7 @@ INSTALL_ONEPROVISION_FILES=( ONEPROVISION_LIB_AWS_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/aws ONEPROVISION_LIB_GOOGLE_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/google ONEPROVISION_LIB_DIGITALOCEAN_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/digitalocean - ONEPROVISION_LIB_PACKET_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/packet + ONEPROVISION_LIB_EQUINIX_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/equinix ONEPROVISION_LIB_VULTR_METAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_metal ONEPROVISION_LIB_VULTR_VIRTUAL_ERB_FILES:$LIB_LOCATION/oneprovision/lib/terraform/providers/templates/vultr_virtual ONEPROVISION_LIB_PROVISION_FILES:$LIB_LOCATION/oneprovision/lib/provision @@ -1018,9 +1018,9 @@ RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \ src/vmm_mad/remotes/az/az_driver.rb \ src/vmm_mad/remotes/ec2/ec2_driver.rb \ src/vmm_mad/remotes/one/opennebula_driver.rb \ - src/vmm_mad/remotes/packet/packet_driver.rb \ + src/vmm_mad/remotes/equinix/equinix_driver.rb \ src/vnm_mad/remotes/elastic/aws_vnm.rb \ - src/vnm_mad/remotes/elastic/packet_vnm.rb \ + src/vnm_mad/remotes/elastic/equinix_vnm.rb \ src/vnm_mad/remotes/elastic/vultr_vnm.rb" #------------------------------------------------------------------------------- @@ -1369,15 +1369,15 @@ VMM_EXEC_ONE_SCRIPTS="src/vmm_mad/remotes/one/cancel \ src/vmm_mad/remotes/one/prereconfigure" #------------------------------------------------------------------------------ -# VMM Driver Packet scripts, to be installed under $REMOTES_LOCATION/vmm/packet +# VMM Driver Equinix scripts, to be installed under $REMOTES_LOCATION/vmm/equinix #------------------------------------------------------------------------------ -VMM_EXEC_PACKET_SCRIPTS="src/vmm_mad/remotes/packet/cancel \ - src/vmm_mad/remotes/packet/deploy \ - src/vmm_mad/remotes/packet/reboot \ - src/vmm_mad/remotes/packet/reset \ - src/vmm_mad/remotes/packet/poll \ - src/vmm_mad/remotes/packet/shutdown" +VMM_EXEC_EQUINIX_SCRIPTS="src/vmm_mad/remotes/equinix/cancel \ + src/vmm_mad/remotes/equinix/deploy \ + src/vmm_mad/remotes/equinix/reboot \ + src/vmm_mad/remotes/equinix/reset \ + src/vmm_mad/remotes/equinix/poll \ + src/vmm_mad/remotes/equinix/shutdown" #------------------------------------------------------------------------------- # Information Manager Probes, to be installed under $REMOTES_LOCATION/im @@ -1662,28 +1662,28 @@ IM_PROBES_ONE_VM_MONITOR_FILES="\ IM_PROBES_ONE_VM_STATUS_FILES="\ src/im_mad/remotes/one-probes.d/vm/status/probe_vm_status.rb" -IM_PROBES_PACKET_FILES="src/im_mad/remotes/packet.d/poll" +IM_PROBES_EQUINIX_FILES="src/im_mad/remotes/equinix.d/poll" -# PACKET monitord-client -IM_PROBES_PACKET_FILES="\ - src/im_mad/remotes/packet.d/monitord-client_control.sh \ - src/im_mad/remotes/packet.d/monitord-client.rb" +# EQUINIX monitord-client +IM_PROBES_EQUINIX_FILES="\ + src/im_mad/remotes/equinix.d/monitord-client_control.sh \ + src/im_mad/remotes/equinix.d/monitord-client.rb" -# PACKET probes -IM_PROBES_PACKET_HOST_BEACON_FILES="\ - src/im_mad/remotes/packet-probes.d/host/beacon/monitord-client-shepherd_local.sh" +# EQUINIX probes +IM_PROBES_EQUINIX_HOST_BEACON_FILES="\ + src/im_mad/remotes/equinix-probes.d/host/beacon/monitord-client-shepherd_local.sh" -IM_PROBES_PACKET_HOST_MONITOR_FILES="\ - src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb" +IM_PROBES_EQUINIX_HOST_MONITOR_FILES="\ + src/im_mad/remotes/equinix-probes.d/host/monitor/probe_host_monitor.rb" -IM_PROBES_PACKET_HOST_SYSTEM_FILES="\ - src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb" +IM_PROBES_EQUINIX_HOST_SYSTEM_FILES="\ + src/im_mad/remotes/equinix-probes.d/host/system/probe_host_system.rb" -IM_PROBES_PACKET_VM_MONITOR_FILES="\ - src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb" +IM_PROBES_EQUINIX_VM_MONITOR_FILES="\ + src/im_mad/remotes/equinix-probes.d/vm/monitor/probe_vm_monitor.rb" -IM_PROBES_PACKET_VM_STATUS_FILES="\ - src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb" +IM_PROBES_EQUINIX_VM_STATUS_FILES="\ + src/im_mad/remotes/equinix-probes.d/vm/status/probe_vm_status.rb" IM_PROBES_VERSION="src/im_mad/remotes/VERSION" @@ -1807,13 +1807,13 @@ IPAM_DRIVER_DUMMY_SCRIPTS="src/ipamm_mad/remotes/dummy/register_address_range \ src/ipamm_mad/remotes/dummy/free_address" #------------------------------------------------------------------------------- -# IPAM Packet drivers to be installed under $REMOTES_LOCATION/ipam +# IPAM Equinix drivers to be installed under $REMOTES_LOCATION/ipam #------------------------------------------------------------------------------- -IPAM_DRIVER_PACKET_SCRIPTS="src/ipamm_mad/remotes/packet/register_address_range \ - src/ipamm_mad/remotes/packet/unregister_address_range \ - src/ipamm_mad/remotes/packet/allocate_address \ - src/ipamm_mad/remotes/packet/get_address \ - src/ipamm_mad/remotes/packet/free_address" +IPAM_DRIVER_EQUINIX_SCRIPTS="src/ipamm_mad/remotes/equinix/register_address_range \ + src/ipamm_mad/remotes/equinix/unregister_address_range \ + src/ipamm_mad/remotes/equinix/allocate_address \ + src/ipamm_mad/remotes/equinix/get_address \ + src/ipamm_mad/remotes/equinix/free_address" #------------------------------------------------------------------------------- # IPAM Vultr drivers to be installed under $REMOTES_LOCATION/ipam @@ -2570,7 +2570,7 @@ ONEPROVISION_LIB_PROVIDERS_FILES="src/oneprovision/lib/terraform/providers/aws.r src/oneprovision/lib/terraform/providers/digitalocean.rb \ src/oneprovision/lib/terraform/providers/dummy.rb \ src/oneprovision/lib/terraform/providers/example \ - src/oneprovision/lib/terraform/providers/packet.rb \ + src/oneprovision/lib/terraform/providers/equinix.rb \ src/oneprovision/lib/terraform/providers/vultr.rb \ src/oneprovision/lib/terraform/providers/vultr_metal.rb \ src/oneprovision/lib/terraform/providers/vultr_virtual.rb" @@ -2593,11 +2593,11 @@ ONEPROVISION_LIB_DIGITALOCEAN_ERB_FILES="src/oneprovision/lib/terraform/provider src/oneprovision/lib/terraform/providers/templates/digitalocean/network.erb \ src/oneprovision/lib/terraform/providers/templates/digitalocean/provider.erb" -ONEPROVISION_LIB_PACKET_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/packet/cluster.erb \ - src/oneprovision/lib/terraform/providers/templates/packet/datastore.erb \ - src/oneprovision/lib/terraform/providers/templates/packet/host.erb \ - src/oneprovision/lib/terraform/providers/templates/packet/network.erb \ - src/oneprovision/lib/terraform/providers/templates/packet/provider.erb" +ONEPROVISION_LIB_EQUINIX_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/equinix/cluster.erb \ + src/oneprovision/lib/terraform/providers/templates/equinix/datastore.erb \ + src/oneprovision/lib/terraform/providers/templates/equinix/host.erb \ + src/oneprovision/lib/terraform/providers/templates/equinix/network.erb \ + src/oneprovision/lib/terraform/providers/templates/equinix/provider.erb" ONEPROVISION_LIB_VULTR_METAL_ERB_FILES="src/oneprovision/lib/terraform/providers/templates/vultr_metal/cluster.erb \ src/oneprovision/lib/terraform/providers/templates/vultr_metal/datastore.erb \ @@ -2852,7 +2852,7 @@ FIREEDGE_PROVISION_ETC_PROVIDERS="src/fireedge/etc/provision/providers.d/aws.yam src/fireedge/etc/provision/providers.d/digitalocean.yaml \ src/fireedge/etc/provision/providers.d/dummy.yaml \ src/fireedge/etc/provision/providers.d/google.yaml \ - src/fireedge/etc/provision/providers.d/packet.yaml \ + src/fireedge/etc/provision/providers.d/equinix.yaml \ src/fireedge/etc/provision/providers.d/vultr_metal.yaml \ src/fireedge/etc/provision/providers.d/vultr_virtual.yaml" diff --git a/share/etc/oned.conf b/share/etc/oned.conf index 3d350533ce..4b0f1146b0 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -668,7 +668,7 @@ MARKET_MAD = [ IPAM_MAD = [ EXECUTABLE = "one_ipam", - ARGUMENTS = "-t 1 -i dummy,aws,packet,vultr" + ARGUMENTS = "-t 1 -i dummy,aws,equinix,vultr" ] #******************************************************************************* @@ -975,20 +975,10 @@ HOST_ENCRYPTED_ATTR = "VCENTER_PASSWORD" HOST_ENCRYPTED_ATTR = "NSX_PASSWORD" HOST_ENCRYPTED_ATTR = "ONE_PASSWORD" -# CLUSTER_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN" - -# DATASTORE_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN" - -# VM_ENCRYPTED_ATTR = "PACKET_TOKEN -# VM_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN VM_ENCRYPTED_ATTR = "CONTEXT/PASSWORD" IMAGE_ENCRYPTED_ATTR = "LUKS_PASSWORD" -# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN -# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN -# VNET_ENCRYPTED_ATTR = "PROVISION/PACKET_TOKEN - # DDC encrypted attrs DOCUMENT_ENCRYPTED_ATTR = "PROVISION_BODY" diff --git a/share/linters/.rubocop.yml b/share/linters/.rubocop.yml index a0c856dfc9..a384dc6d68 100644 --- a/share/linters/.rubocop.yml +++ b/share/linters/.rubocop.yml @@ -63,12 +63,12 @@ AllCops: - src/pm_mad/remotes/dummy/deploy - src/pm_mad/remotes/dummy/reset - src/pm_mad/remotes/dummy/poll - - src/pm_mad/remotes/packet/cancel - - src/pm_mad/remotes/packet/shutdown - - src/pm_mad/remotes/packet/reboot - - src/pm_mad/remotes/packet/deploy - - src/pm_mad/remotes/packet/reset - - src/pm_mad/remotes/packet/poll + - src/pm_mad/remotes/equinix/cancel + - src/pm_mad/remotes/equinix/shutdown + - src/pm_mad/remotes/equinix/reboot + - src/pm_mad/remotes/equinix/deploy + - src/pm_mad/remotes/equinix/reset + - src/pm_mad/remotes/equinix/poll - src/pm_mad/remotes/ec2/cancel - src/pm_mad/remotes/ec2/shutdown - src/pm_mad/remotes/ec2/reboot @@ -82,7 +82,7 @@ AllCops: - src/im_mad/remotes/kvm-probes.d/pci.rb - src/im_mad/remotes/kvm.d/monitord-client.rb - src/im_mad/remotes/lxd.d/monitord-client.rb - - src/im_mad/remotes/packet.d/poll + - src/im_mad/remotes/equinix.d/poll - src/im_mad/remotes/ec2.d/poll - src/im_mad/remotes/one.d/poll - src/im_mad/remotes/az.d/poll @@ -137,12 +137,12 @@ AllCops: - src/vmm_mad/remotes/az/save - src/vmm_mad/remotes/az/restore - src/vmm_mad/remotes/az/poll - - src/vmm_mad/remotes/packet/cancel - - src/vmm_mad/remotes/packet/shutdown - - src/vmm_mad/remotes/packet/reboot - - src/vmm_mad/remotes/packet/deploy - - src/vmm_mad/remotes/packet/reset - - src/vmm_mad/remotes/packet/poll + - src/vmm_mad/remotes/equinix/cancel + - src/vmm_mad/remotes/equinix/shutdown + - src/vmm_mad/remotes/equinix/reboot + - src/vmm_mad/remotes/equinix/deploy + - src/vmm_mad/remotes/equinix/reset + - src/vmm_mad/remotes/equinix/poll - src/vmm_mad/remotes/ec2/cancel - src/vmm_mad/remotes/ec2/shutdown - src/vmm_mad/remotes/ec2/reboot @@ -386,7 +386,7 @@ AllCops: - src/vmm_mad/remotes/lib/lxd/opennebula_vm.rb - src/vmm_mad/remotes/lib/lxd/command.rb - src/vmm_mad/remotes/lib/poll_common.rb - - src/vmm_mad/remotes/packet/packet_driver.rb + - src/vmm_mad/remotes/equinix/equinix_driver.rb - src/vmm_mad/remotes/ec2/ec2_driver.rb - src/mad/ruby/ssh_stream.rb - src/mad/ruby/test/MonkeyPatcher.rb diff --git a/share/oneprovision/ansible/packet.yml b/share/oneprovision/ansible/equinix.yml similarity index 100% rename from share/oneprovision/ansible/packet.yml rename to share/oneprovision/ansible/equinix.yml diff --git a/share/oneprovision/edge-clusters/metal/providers/packet/packet-ams1.yml b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ams1.yml similarity index 56% rename from share/oneprovision/edge-clusters/metal/providers/packet/packet-ams1.yml rename to share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ams1.yml index fe4077e301..f95261fe25 100644 --- a/share/oneprovision/edge-clusters/metal/providers/packet/packet-ams1.yml +++ b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ams1.yml @@ -1,19 +1,19 @@ -name: 'packet-amsterdam' +name: 'equinix-amsterdam' description: 'Edge cluster in Equinix Amsterdam' -provider: 'packet' +provider: 'equinix' connection: - token: 'Packet token' - project: 'Packet project' + token: 'Equinix token' + project: 'Equinix project' facility: 'ams1' inputs: - - name: 'packet_os' + - name: 'equinix_os' type: 'list' options: - 'centos_8' - - name: 'packet_plan' + - name: 'equinix_plan' type: 'list' options: - 'baremetal_0' diff --git a/share/oneprovision/edge-clusters/metal/providers/packet/packet-ewr1.yml b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ewr1.yml similarity index 62% rename from share/oneprovision/edge-clusters/metal/providers/packet/packet-ewr1.yml rename to share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ewr1.yml index 366066541e..ba7917f786 100644 --- a/share/oneprovision/edge-clusters/metal/providers/packet/packet-ewr1.yml +++ b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-ewr1.yml @@ -1,19 +1,19 @@ -name: 'packet-ewr1' +name: 'equinix-ewr1' description: 'Edge cluster in Equinix Parsippany, USA, NJ' -provider: 'packet' +provider: 'equinix' connection: - token: 'Packet token' - project: 'Packet project' + token: 'Equinix token' + project: 'Equinix project' facility: 'ewr1' inputs: - - name: 'packet_os' + - name: 'equinix_os' type: 'list' options: - 'centos_8' - - name: 'packet_plan' + - name: 'equinix_plan' type: 'list' options: - 't1.small' diff --git a/share/oneprovision/edge-clusters/metal/providers/packet/packet-nrt1.yml b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-nrt1.yml similarity index 62% rename from share/oneprovision/edge-clusters/metal/providers/packet/packet-nrt1.yml rename to share/oneprovision/edge-clusters/metal/providers/equinix/equinix-nrt1.yml index b9660b1f8e..fbec8f0490 100644 --- a/share/oneprovision/edge-clusters/metal/providers/packet/packet-nrt1.yml +++ b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-nrt1.yml @@ -1,19 +1,19 @@ -name: 'packet-nrt1' +name: 'equinix-nrt1' description: 'Edge cluster in Equinix Tokyo, Japan' -provider: 'packet' +provider: 'equinix' connection: - token: 'Packet token' - project: 'Packet project' + token: 'Equinix token' + project: 'Equinix project' facility: 'nrt1' inputs: - - name: 'packet_os' + - name: 'equinix_os' type: 'list' options: - 'centos_8' - - name: 'packet_plan' + - name: 'equinix_plan' type: 'list' options: - 't1.small' diff --git a/share/oneprovision/edge-clusters/metal/providers/packet/packet-sjc1.yml b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-sjc1.yml similarity index 61% rename from share/oneprovision/edge-clusters/metal/providers/packet/packet-sjc1.yml rename to share/oneprovision/edge-clusters/metal/providers/equinix/equinix-sjc1.yml index da6e4eb895..bd6f40c8b5 100644 --- a/share/oneprovision/edge-clusters/metal/providers/packet/packet-sjc1.yml +++ b/share/oneprovision/edge-clusters/metal/providers/equinix/equinix-sjc1.yml @@ -1,19 +1,19 @@ -name: 'packet-sjc1' +name: 'equinix-sjc1' description: 'Edge cluster in Equinix, USA, CA' -provider: 'packet' +provider: 'equinix' connection: - token: 'Packet token' - project: 'Packet project' + token: 'Equinix token' + project: 'Equinix project' facility: 'sjc1' inputs: - - name: 'packet_os' + - name: 'equinix_os' type: 'list' options: - 'centos_8' - - name: 'packet_plan' + - name: 'equinix_plan' type: 'list' options: - 't1.small' diff --git a/share/oneprovision/edge-clusters/metal/provisions/common.d/hosts.yml b/share/oneprovision/edge-clusters/metal/provisions/common.d/hosts.yml index b6c1f11407..1f7e857384 100644 --- a/share/oneprovision/edge-clusters/metal/provisions/common.d/hosts.yml +++ b/share/oneprovision/edge-clusters/metal/provisions/common.d/hosts.yml @@ -16,7 +16,7 @@ # ---------------------------------------------------------------------------- # #------------------------------------------------------------------------------- -# hosts: Packet or AWS metal servers +# hosts: Equinix or AWS metal servers # provision: # - count: Number of servers to create # - hostname: kvm-host1, kvm-host2 .... of the server diff --git a/share/oneprovision/edge-clusters/metal/provisions/packet.d/datastores.yml b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/datastores.yml similarity index 100% rename from share/oneprovision/edge-clusters/metal/provisions/packet.d/datastores.yml rename to share/oneprovision/edge-clusters/metal/provisions/equinix.d/datastores.yml diff --git a/share/oneprovision/edge-clusters/metal/provisions/packet.d/fireedge.yml b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/fireedge.yml similarity index 96% rename from share/oneprovision/edge-clusters/metal/provisions/packet.d/fireedge.yml rename to share/oneprovision/edge-clusters/metal/provisions/equinix.d/fireedge.yml index f814b3abdc..afcd28cb88 100644 --- a/share/oneprovision/edge-clusters/metal/provisions/packet.d/fireedge.yml +++ b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/fireedge.yml @@ -16,5 +16,4 @@ # ---------------------------------------------------------------------------- # image: 'OPENNEBULA-EQUINIX' -provider: 'packet' -provision_type: 'metal' +provider: 'equinix' diff --git a/share/oneprovision/edge-clusters/metal/provisions/packet.d/inputs.yml b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/inputs.yml similarity index 92% rename from share/oneprovision/edge-clusters/metal/provisions/packet.d/inputs.yml rename to share/oneprovision/edge-clusters/metal/provisions/equinix.d/inputs.yml index efc831cdff..327667f5d3 100644 --- a/share/oneprovision/edge-clusters/metal/provisions/packet.d/inputs.yml +++ b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/inputs.yml @@ -31,14 +31,14 @@ inputs: description: 'Comma separated list of DNS servers for public network' default: '1.1.1.1' - - name: 'packet_plan' + - name: 'equinix_plan' type: text - description: "Packet plan (device type)" + description: "Equinix plan (device type)" default: 'baremetal_0' - - name: 'packet_os' + - name: 'equinix_os' type: text - description: "Packet host operating system" + description: "Equinix host operating system" default: 'centos_8' - name: 'one_hypervisor' diff --git a/share/oneprovision/edge-clusters/metal/provisions/packet.d/networks.yml b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/networks.yml similarity index 96% rename from share/oneprovision/edge-clusters/metal/provisions/packet.d/networks.yml rename to share/oneprovision/edge-clusters/metal/provisions/equinix.d/networks.yml index f304280a07..7437d2d90e 100644 --- a/share/oneprovision/edge-clusters/metal/provisions/packet.d/networks.yml +++ b/share/oneprovision/edge-clusters/metal/provisions/equinix.d/networks.yml @@ -26,8 +26,8 @@ networks: ar: - provison_id: "${provision_id}" size: '1' - packet_ip_type: 'public_ipv4' - ipam_mad: 'packet' + equinix_ip_type: 'public_ipv4' + ipam_mad: 'equinix' vntemplates: - name: "${provision}-private" diff --git a/share/oneprovision/edge-clusters/metal/provisions/packet.yml b/share/oneprovision/edge-clusters/metal/provisions/equinix.yml similarity index 89% rename from share/oneprovision/edge-clusters/metal/provisions/packet.yml rename to share/oneprovision/edge-clusters/metal/provisions/equinix.yml index 8a249c6927..bec4b692c2 100644 --- a/share/oneprovision/edge-clusters/metal/provisions/packet.yml +++ b/share/oneprovision/edge-clusters/metal/provisions/equinix.yml @@ -16,36 +16,36 @@ # ---------------------------------------------------------------------------- # #------------------------------------------------------------------------------- -# This is the canonical description file for a cluster build with 'Packet' +# This is the canonical description file for a cluster build with 'Equinix' # resources using the KVM hypervisor. # ------------------------------------------------------------------------------ -name: 'packet-cluster' +name: 'equinix-cluster' extends: - common.d/defaults.yml - common.d/resources.yml - common.d/hosts.yml - - packet.d/datastores.yml - - packet.d/fireedge.yml - - packet.d/inputs.yml - - packet.d/networks.yml + - equinix.d/datastores.yml + - equinix.d/fireedge.yml + - equinix.d/inputs.yml + - equinix.d/networks.yml #------------------------------------------------------------------------------- # playbook: Ansible playbook used for hosts configuration. Check -# ansible/packet.yml for the specific roles applied. +# ansible/equinix.yml for the specific roles applied. #------------------------------------------------------------------------------- playbook: - - packet + - equinix #------------------------------------------------------------------------------- # defaults: Common configuration attributes for provision objects #-------------------------------------------------------------------------------- defaults: provision: - provider_name: 'packet' - plan: "${input.packet_plan}" - os: "${input.packet_os}" + provider_name: 'equinix' + plan: "${input.equinix_plan}" + os: "${input.equinix_os}" #------------------------------------------------------------------------------- # cluster: Parameters for the OpenNebula cluster. Applies to all the Hosts diff --git a/share/oneprovision/edge-clusters/onprem/provisions/onprem.d/hosts.yml b/share/oneprovision/edge-clusters/onprem/provisions/onprem.d/hosts.yml index a1e4946b94..5a9acbdc9a 100644 --- a/share/oneprovision/edge-clusters/onprem/provisions/onprem.d/hosts.yml +++ b/share/oneprovision/edge-clusters/onprem/provisions/onprem.d/hosts.yml @@ -16,7 +16,7 @@ # ---------------------------------------------------------------------------- # #------------------------------------------------------------------------------- -# hosts: Packet or AWS metal servers +# hosts: Physical servers # provision: # - count: Number of servers to create # - hostname: kvm-host1, kvm-host2 .... of the server diff --git a/share/oneprovision/edge-clusters/virtual/provisions/digitalocean.d/fireedge.yml b/share/oneprovision/edge-clusters/virtual/provisions/digitalocean.d/fireedge.yml index fb3f6c3fab..6ca09c5cac 100644 --- a/share/oneprovision/edge-clusters/virtual/provisions/digitalocean.d/fireedge.yml +++ b/share/oneprovision/edge-clusters/virtual/provisions/digitalocean.d/fireedge.yml @@ -17,4 +17,3 @@ image: 'OPENNEBULA-DIGITALOCEAN' provider: 'digitalocean' -provision_type: 'virtual' diff --git a/share/oneprovision/edge-clusters/virtual/provisions/vultr.d/fireedge.yml b/share/oneprovision/edge-clusters/virtual/provisions/vultr.d/fireedge.yml index c122c4cab8..5808ac000e 100644 --- a/share/oneprovision/edge-clusters/virtual/provisions/vultr.d/fireedge.yml +++ b/share/oneprovision/edge-clusters/virtual/provisions/vultr.d/fireedge.yml @@ -17,4 +17,3 @@ image: 'OPENNEBULA-VULTR' provider: 'vultr_virtual' -provision_type: 'virtual' diff --git a/src/cli/oneprovider b/src/cli/oneprovider index abf05351e9..ec634bded6 100755 --- a/src/cli/oneprovider +++ b/src/cli/oneprovider @@ -112,22 +112,6 @@ CommandParser::CmdParser.new(ARGV) do create_desc = <<-EOT.unindent Allocate a new provider. Configuration file must be written in YAML. - - $ cat packet.yaml - name: 'packet_custom' - provider: 'packet' - connection: - packet_token: "Packet token" - packet_project: "Packet project" - facility: "Packet facility" - - $ cat ec2.yaml - name: 'aws_custom', - provider: 'aws' - connection: - ec2_access: "AWS access key" - ec2_secret: "AWS secret key" - region_name: "AWS region name"" EOT command :create, create_desc, :template do diff --git a/src/fireedge/etc/provision/providers.d/packet.yaml b/src/fireedge/etc/provision/providers.d/equinix.yaml similarity index 67% rename from src/fireedge/etc/provision/providers.d/packet.yaml rename to src/fireedge/etc/provision/providers.d/equinix.yaml index a4970c03b8..775b743ddb 100644 --- a/src/fireedge/etc/provision/providers.d/packet.yaml +++ b/src/fireedge/etc/provision/providers.d/equinix.yaml @@ -1,4 +1,4 @@ -name: 'Packet' +name: 'Equinix' image: 'EQUINIX' provision_type: 'metal' location_key: 'facility' diff --git a/src/im_mad/remotes/common.d/monitord-client.rb b/src/im_mad/remotes/common.d/monitord-client.rb index 3643d81ff6..a96aff0926 100644 --- a/src/im_mad/remotes/common.d/monitord-client.rb +++ b/src/im_mad/remotes/common.d/monitord-client.rb @@ -149,7 +149,7 @@ end #------------------------------------------------------------------------------- # Script helper functions and gLobals #------------------------------------------------------------------------------- -LOCAL_HYPERVISOR = %w[az ec2 one packet].freeze +LOCAL_HYPERVISOR = %w[az ec2 one equinix].freeze def local?(hypervisor) LOCAL_HYPERVISOR.include?(hypervisor) diff --git a/src/im_mad/remotes/packet-probes.d/host/beacon/monitord-client-shepherd_local.sh b/src/im_mad/remotes/equinix-probes.d/host/beacon/monitord-client-shepherd_local.sh similarity index 100% rename from src/im_mad/remotes/packet-probes.d/host/beacon/monitord-client-shepherd_local.sh rename to src/im_mad/remotes/equinix-probes.d/host/beacon/monitord-client-shepherd_local.sh diff --git a/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb b/src/im_mad/remotes/equinix-probes.d/host/monitor/probe_host_monitor.rb similarity index 95% rename from src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb rename to src/im_mad/remotes/equinix-probes.d/host/monitor/probe_host_monitor.rb index d9e09ab85b..453652ed81 100755 --- a/src/im_mad/remotes/packet-probes.d/host/monitor/probe_host_monitor.rb +++ b/src/im_mad/remotes/equinix-probes.d/host/monitor/probe_host_monitor.rb @@ -48,14 +48,14 @@ end $LOAD_PATH << RUBY_LIB_LOCATION -require 'packet_driver' +require 'equinix_driver' host = ARGV[-1] host_id = ARGV[-2] -packet_drv = PacketDriver.new(host, host_id) +equinix_drv = EquinixDriver.new(host, host_id) begin - puts packet_drv.probe_host_monitor + puts equinix_drv.probe_host_monitor rescue StandardError => e OpenNebula.handle_driver_exception('im probe_host_monitor', e, host) end diff --git a/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb b/src/im_mad/remotes/equinix-probes.d/host/system/probe_host_system.rb similarity index 95% rename from src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb rename to src/im_mad/remotes/equinix-probes.d/host/system/probe_host_system.rb index be62624668..9546cf9e23 100755 --- a/src/im_mad/remotes/packet-probes.d/host/system/probe_host_system.rb +++ b/src/im_mad/remotes/equinix-probes.d/host/system/probe_host_system.rb @@ -48,14 +48,14 @@ end $LOAD_PATH << RUBY_LIB_LOCATION -require 'packet_driver' +require 'equinix_driver' host = ARGV[-1] host_id = ARGV[-2] -packet_drv = PacketDriver.new(host, host_id) +equinix_drv = EquinixDriver.new(host, host_id) begin - puts packet_drv.probe_host_system + puts equinix_drv.probe_host_system rescue StandardError => e OpenNebula.handle_driver_exception('im probe_host_system', e, host) end diff --git a/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb b/src/im_mad/remotes/equinix-probes.d/vm/monitor/probe_vm_monitor.rb similarity index 95% rename from src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb rename to src/im_mad/remotes/equinix-probes.d/vm/monitor/probe_vm_monitor.rb index acfd1b84fd..0e500652b5 100755 --- a/src/im_mad/remotes/packet-probes.d/vm/monitor/probe_vm_monitor.rb +++ b/src/im_mad/remotes/equinix-probes.d/vm/monitor/probe_vm_monitor.rb @@ -48,14 +48,14 @@ end $LOAD_PATH << RUBY_LIB_LOCATION -require 'packet_driver' +require 'equinix_driver' host = ARGV[-1] host_id = ARGV[-2] -packet_drv = PacketDriver.new(host, host_id) +equinix_drv = EquinixDriver.new(host, host_id) begin - puts packet_drv.probe_vm_monitor + puts equinix_drv.probe_vm_monitor rescue StandardError => e OpenNebula.handle_driver_exception('im probe_vm_monitor', e, host) end diff --git a/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb b/src/im_mad/remotes/equinix-probes.d/vm/status/probe_vm_status.rb similarity index 97% rename from src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb rename to src/im_mad/remotes/equinix-probes.d/vm/status/probe_vm_status.rb index da5465fb10..dc4dae41f9 100755 --- a/src/im_mad/remotes/packet-probes.d/vm/status/probe_vm_status.rb +++ b/src/im_mad/remotes/equinix-probes.d/vm/status/probe_vm_status.rb @@ -48,14 +48,14 @@ end $LOAD_PATH << RUBY_LIB_LOCATION -require 'packet_driver' +require 'equinix_driver' require_relative '../../../lib/probe_db' host = ARGV[-1] host_id = ARGV[-2] begin - vmdb = VirtualMachineDB.new('packet', + vmdb = VirtualMachineDB.new('equinix', host, host_id, :missing_state => 'UNKNOWN', diff --git a/src/im_mad/remotes/packet.d/monitord-client.rb b/src/im_mad/remotes/equinix.d/monitord-client.rb similarity index 100% rename from src/im_mad/remotes/packet.d/monitord-client.rb rename to src/im_mad/remotes/equinix.d/monitord-client.rb diff --git a/src/im_mad/remotes/packet.d/monitord-client_control.sh b/src/im_mad/remotes/equinix.d/monitord-client_control.sh similarity index 100% rename from src/im_mad/remotes/packet.d/monitord-client_control.sh rename to src/im_mad/remotes/equinix.d/monitord-client_control.sh diff --git a/src/im_mad/remotes/packet.d/version.sh b/src/im_mad/remotes/equinix.d/version.sh similarity index 100% rename from src/im_mad/remotes/packet.d/version.sh rename to src/im_mad/remotes/equinix.d/version.sh diff --git a/src/ipamm_mad/remotes/packet/allocate_address b/src/ipamm_mad/remotes/equinix/allocate_address similarity index 100% rename from src/ipamm_mad/remotes/packet/allocate_address rename to src/ipamm_mad/remotes/equinix/allocate_address diff --git a/src/ipamm_mad/remotes/packet/free_address b/src/ipamm_mad/remotes/equinix/free_address similarity index 100% rename from src/ipamm_mad/remotes/packet/free_address rename to src/ipamm_mad/remotes/equinix/free_address diff --git a/src/ipamm_mad/remotes/packet/get_address b/src/ipamm_mad/remotes/equinix/get_address similarity index 97% rename from src/ipamm_mad/remotes/packet/get_address rename to src/ipamm_mad/remotes/equinix/get_address index f6181a5f01..85ab76ad74 100755 --- a/src/ipamm_mad/remotes/packet/get_address +++ b/src/ipamm_mad/remotes/equinix/get_address @@ -27,8 +27,8 @@ # XML format # # -# Packet AR ID -# Packet auth token +# Equinix AR ID +# Equinix auth token # #
# diff --git a/src/ipamm_mad/remotes/packet/register_address_range b/src/ipamm_mad/remotes/equinix/register_address_range similarity index 93% rename from src/ipamm_mad/remotes/packet/register_address_range rename to src/ipamm_mad/remotes/equinix/register_address_range index 1e031b085b..4fea0eb207 100755 --- a/src/ipamm_mad/remotes/packet/register_address_range +++ b/src/ipamm_mad/remotes/equinix/register_address_range @@ -40,7 +40,7 @@ # The response MUST include IPAM_MAD, TYPE, IP and SIZE attributes, example: # - A basic network definition # AR = [ -# IPAM_MAD = "packet", +# IPAM_MAD = "equinix", # TYPE = "IP4", # IP = "10.0.0.1", # SIZE = "255", @@ -50,7 +50,7 @@ # - A complete network definition. Custom attributes (free form, key-value) # can be added, named cannot be repeated. # AR = [ -# IPAM_MAD = "packet", +# IPAM_MAD = "equinix", # TYPE = "IP4", # IP = "10.0.0.2", # SIZE = "200", @@ -68,12 +68,12 @@ ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION) if !ONE_LOCATION LIB_LOCATION = '/usr/lib/one' - PACKET_LOCATION = '/usr/lib/one/ruby/vendors/packethost/lib' + EQUINIX_LOCATION = '/usr/lib/one/ruby/vendors/packethost/lib' RUBY_LIB_LOCATION = '/usr/lib/one/ruby' GEMS_LOCATION = '/usr/share/one/gems' else LIB_LOCATION = ONE_LOCATION + '/lib' - PACKET_LOCATION = ONE_LOCATION + '/lib/ruby/vendors/packethost/lib' + EQUINIX_LOCATION = ONE_LOCATION + '/lib/ruby/vendors/packethost/lib' RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby' GEMS_LOCATION = ONE_LOCATION + '/share/gems' end @@ -98,7 +98,7 @@ if File.directory?(GEMS_LOCATION) end # %%RUBYGEMS_SETUP_END%% -$LOAD_PATH << PACKET_LOCATION +$LOAD_PATH << EQUINIX_LOCATION $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << LIB_LOCATION + '/oneprovision/lib' @@ -173,7 +173,7 @@ begin pk_facility = connect['facility'] # -------------------------------------------------------------------------- - # Connect to Packet and allocate a new IP + # Connect to Equinix and allocate a new IP # -------------------------------------------------------------------------- private_cidr = data.xpath('//AR/PRIVATE_CIDR').text @@ -184,13 +184,13 @@ begin cidr = IPAddr.new(private_cidr) mask = 0x0FFFFFFFF >> cidr.prefix - packet = Packet::Client.new - packet.auth_token = pk_token + equinix = Packet::Client.new + equinix.auth_token = pk_token ip = Packet::Ip.new ip.project_id = pk_project ip.facility = pk_facility - ip.type = data.xpath('//AR/PACKET_IP_TYPE').text + ip.type = data.xpath('//AR/EQUINIX_IP_TYPE').text ip.quantity = data.xpath('//AR/SIZE').text.to_i if ip.quantity != 1 @@ -206,7 +206,7 @@ begin exit(-1) end - packet.create_ip(ip) + equinix.create_ip(ip) ipmd5 = Digest::MD5.hexdigest(ip.address.to_s).to_i(16) & mask eip = IPAddr.new(ipmd5, Socket::AF_INET) @@ -219,11 +219,11 @@ begin TYPE = "IP4", IP = "#{ipvm}", SIZE = "#{ip.quantity}", - IPAM_MAD = "packet", + IPAM_MAD = "equinix", GATEWAY = "#{ipgw}", EXTERNAL_IP = "#{ip.address}", NETWORK_MASK = "255.255.255.254", - PACKET_IP_ID = "#{ip.id}", + EQUINIX_IP_ID = "#{ip.id}", PROVISION_ID = "#{provision_id}" ] EOF diff --git a/src/ipamm_mad/remotes/packet/unregister_address_range b/src/ipamm_mad/remotes/equinix/unregister_address_range similarity index 87% rename from src/ipamm_mad/remotes/packet/unregister_address_range rename to src/ipamm_mad/remotes/equinix/unregister_address_range index cf49a6c77b..ca9525fc34 100755 --- a/src/ipamm_mad/remotes/packet/unregister_address_range +++ b/src/ipamm_mad/remotes/equinix/unregister_address_range @@ -25,8 +25,8 @@ # XML format # # -# Packet AR ID -# Packet auth token +# Equinix AR ID +# Equinix auth token # # # @@ -35,12 +35,12 @@ ONE_LOCATION = ENV['ONE_LOCATION'] unless defined?(ONE_LOCATION) if !ONE_LOCATION LIB_LOCATION ||= '/usr/lib/one' - PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib' + EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib' RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby' GEMS_LOCATION ||= '/usr/share/one/gems' else LIB_LOCATION ||= ONE_LOCATION + '/lib' - PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib' + EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib' RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby' GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' end @@ -65,7 +65,7 @@ if File.directory?(GEMS_LOCATION) end # %%RUBYGEMS_SETUP_END%% -$LOAD_PATH << PACKET_LOCATION +$LOAD_PATH << EQUINIX_LOCATION $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << LIB_LOCATION + '/oneprovision/lib' @@ -102,19 +102,19 @@ begin pk_token = connect['token'] # -------------------------------------------------------------------------- - # Connect to Packet and delete the IP + # Connect to Equinix and delete the IP # -------------------------------------------------------------------------- - packet = Packet::Client.new - packet.auth_token = pk_token + equinix = Packet::Client.new + equinix.auth_token = pk_token - packet_id = data.xpath('//AR/PACKET_IP_ID').text.to_s + equinix_id = data.xpath('//AR/EQUINIX_IP_ID').text.to_s - if packet_id.empty? - STDERR.puts 'Missing packet range ID' + if equinix_id.empty? + STDERR.puts 'Missing Equinix range ID' exit(-1) end - packet.delete_ip(packet_id) + equinxi.delete_ip(equinix_id) rescue StandardError => e STDERR.puts e.to_s exit(-1) diff --git a/src/onecfg/share/etc/files.yaml b/src/onecfg/share/etc/files.yaml index f9962e87ea..7fe9adbd59 100644 --- a/src/onecfg/share/etc/files.yaml +++ b/src/onecfg/share/etc/files.yaml @@ -41,7 +41,7 @@ group: oneadmin mode: '0640' -- name: /etc/one/packet_driver.default +- name: /etc/one/equinix_driver.default class: Simple owner: root group: oneadmin diff --git a/src/oneprovision/lib/provision/ansible.rb b/src/oneprovision/lib/provision/ansible.rb index e12f25b82d..0a216236e5 100644 --- a/src/oneprovision/lib/provision/ansible.rb +++ b/src/oneprovision/lib/provision/ansible.rb @@ -336,7 +336,7 @@ module OneProvision # Generate "ansible.cfg" file # TODO: what if private_key isn't filename, but content - # TODO: store private key / packet + # TODO: store private key / equinix # credentials securely in the ONE roles = "#{ANSIBLE_LOCATION}/roles" diff --git a/src/oneprovision/lib/terraform/providers/packet.rb b/src/oneprovision/lib/terraform/providers/equinix.rb similarity index 97% rename from src/oneprovision/lib/terraform/providers/packet.rb rename to src/oneprovision/lib/terraform/providers/equinix.rb index 6d67abd207..fc2615324c 100644 --- a/src/oneprovision/lib/terraform/providers/packet.rb +++ b/src/oneprovision/lib/terraform/providers/equinix.rb @@ -19,8 +19,8 @@ require 'terraform/terraform' # Module OneProvision module OneProvision - # Packet Terraform Provider - class Packet < Terraform + # Equinix Terraform Provider + class Equinix < Terraform NAME = Terraform.append_provider(__FILE__, name) diff --git a/src/oneprovision/lib/terraform/providers/templates/packet/cluster.erb b/src/oneprovision/lib/terraform/providers/templates/equinix/cluster.erb similarity index 100% rename from src/oneprovision/lib/terraform/providers/templates/packet/cluster.erb rename to src/oneprovision/lib/terraform/providers/templates/equinix/cluster.erb diff --git a/src/oneprovision/lib/terraform/providers/templates/packet/datastore.erb b/src/oneprovision/lib/terraform/providers/templates/equinix/datastore.erb similarity index 82% rename from src/oneprovision/lib/terraform/providers/templates/packet/datastore.erb rename to src/oneprovision/lib/terraform/providers/templates/equinix/datastore.erb index 11ea8893aa..b8b0092c60 100644 --- a/src/oneprovision/lib/terraform/providers/templates/packet/datastore.erb +++ b/src/oneprovision/lib/terraform/providers/templates/equinix/datastore.erb @@ -1,7 +1,7 @@ #resource "packet_volume" "device_<%= obj['ID'] %>" { # description = "<%= obj['ID'] %>_volume" # facility = "<%= provision['FACILITY'] %>" -# project_id = "<%= provision['PACKET_PROJECT'] %>" +# project_id = "<%= provision['PROJECT'] %>" # plan = "<%= provision['PLAN'] %>" # size = "<%= obj['TOTAL_MB'] %>" # billing_cycle = "hourly" diff --git a/src/oneprovision/lib/terraform/providers/templates/packet/host.erb b/src/oneprovision/lib/terraform/providers/templates/equinix/host.erb similarity index 100% rename from src/oneprovision/lib/terraform/providers/templates/packet/host.erb rename to src/oneprovision/lib/terraform/providers/templates/equinix/host.erb diff --git a/src/oneprovision/lib/terraform/providers/templates/packet/network.erb b/src/oneprovision/lib/terraform/providers/templates/equinix/network.erb similarity index 100% rename from src/oneprovision/lib/terraform/providers/templates/packet/network.erb rename to src/oneprovision/lib/terraform/providers/templates/equinix/network.erb diff --git a/src/oneprovision/lib/terraform/providers/templates/packet/provider.erb b/src/oneprovision/lib/terraform/providers/templates/equinix/provider.erb similarity index 100% rename from src/oneprovision/lib/terraform/providers/templates/packet/provider.erb rename to src/oneprovision/lib/terraform/providers/templates/equinix/provider.erb diff --git a/src/vmm_mad/remotes/packet/cancel b/src/vmm_mad/remotes/equinix/cancel similarity index 95% rename from src/vmm_mad/remotes/packet/cancel rename to src/vmm_mad/remotes/equinix/cancel index a8402d177f..ea177a47c3 100755 --- a/src/vmm_mad/remotes/packet/cancel +++ b/src/vmm_mad/remotes/equinix/cancel @@ -49,7 +49,7 @@ end $LOAD_PATH << File.dirname(__FILE__) $LOAD_PATH << RUBY_LIB_LOCATION -require 'packet_driver' +require 'equinix_driver' require 'opennebula' deploy_id = ARGV[0] @@ -61,8 +61,8 @@ begin vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one) vm.info - packet_drv = PacketDriver.new(host) - packet_drv.cancel(deploy_id, vm.lcm_state_str) + equinix_drv = EquinixDriver.new(host) + equinix_drv.cancel(deploy_id, vm.lcm_state_str) rescue Exception => e STDERR.puts < e STDERR.puts <0, 'until'=>1523889200}).body path = "devices/#{device.id}/bandwidth" - @packet.get(path).body['bandwidth'].map do |bw| + @equinix.get(path).body['bandwidth'].map do |bw| sum = 0 bw['datapoints'].each do |data, _time| @@ -391,10 +391,10 @@ class PacketDriver conn_opts = {} begin - conn_opts['PACKET_TOKEN'] = xhost['TEMPLATE/PACKET_TOKEN'] - conn_opts['PROJECT'] = xhost['TEMPLATE/PACKET_PROJECT'] + conn_opts['EQUINIX_TOKEN'] = xhost['TEMPLATE/EQUINIX_TOKEN'] + conn_opts['PROJECT'] = xhost['TEMPLATE/EQUINIX_PROJECT'] rescue StandardError - raise "HOST: #{xhost['NAME']} must have Packet credentials" + raise "HOST: #{xhost['NAME']} must have Equinix credentials" end conn_opts @@ -420,10 +420,10 @@ class PacketDriver # @return [Packet::Device] def xobj2device(xobj, xpath, xpath_context) device = Packet::Device.new - device.client = @packet + device.client = @equinix - DEPLOY_ATTRIBUTES.each do |packet_name, template_name| - key = "@#{packet_name}".to_sym + DEPLOY_ATTRIBUTES.each do |equinix_name, template_name| + key = "@#{equinix_name}".to_sym val = xobj["#{xpath}/#{template_name}"] if @globals[template_name] @@ -477,38 +477,38 @@ class PacketDriver def delete(deploy_id) device = Packet::Device.new('id' => deploy_id) - @packet.delete_device(device) + @equinix.delete_device(device) end def power_off(deploy_id) device = Packet::Device.new('id' => deploy_id) - @packet.power_off_device(device) + @equinix.power_off_device(device) end def power_on(deploy_id) device = Packet::Device.new('id' => deploy_id) - @packet.power_on_device(device) + @equinix.power_on_device(device) end def reboot_device(deploy_id) device = Packet::Device.new('id' => deploy_id) - @packet.reboot_device(device) + @equinix.reboot_device(device) end def list_devices(project_id) - @packet.list_devices(project_id) + @equinix.list_devices(project_id) end def get_device(deploy_id) begin - @packet.get_device(deploy_id) + @equinix.get_device(deploy_id) rescue Packet::NotFound nil end end def list_projects - @packet.list_projects + @equinix.list_projects end # TODO: configuration state_wait_timeout @@ -527,12 +527,12 @@ class PacketDriver if device.nil? return if state == :done - raise PacketDriverDeviceNotFound, + raise EquinixDriverDeviceNotFound, "Device with #{deploy_id} not found" end if device.state == :failed - raise PacketDriverInvalidDeviceState, + raise EquinixDriverInvalidDeviceState, "Invalid device state #{device.state}" end @@ -543,7 +543,7 @@ class PacketDriver break if (Time.now - t_s) > state_change_timeout end - raise PacketDriverTimeout, "Wait for host state '#{state}' timed out" + raise EquinixDriverTimeout, "Wait for host state '#{state}' timed out" end end @@ -555,9 +555,9 @@ end module DomainList def self.state_info(name, id) - packet = PacketDriver.new(name, id) + equinix = EquinixDriver.new(name, id) - vms = packet.retreive_vms_data + vms = equinix.retreive_vms_data info = {} vms.each do |vm| @@ -565,7 +565,7 @@ module DomainList :uuid => vm[:uuid], :name => vm[:name], :state => vm[:state], - :hyperv => 'packet' } + :hyperv => 'equinix' } end info diff --git a/src/vmm_mad/remotes/packet/poll b/src/vmm_mad/remotes/equinix/poll similarity index 93% rename from src/vmm_mad/remotes/packet/poll rename to src/vmm_mad/remotes/equinix/poll index 28874a80bd..226469ba5d 100755 --- a/src/vmm_mad/remotes/packet/poll +++ b/src/vmm_mad/remotes/equinix/poll @@ -49,7 +49,7 @@ end $LOAD_PATH << RUBY_LIB_LOCATION $LOAD_PATH << File.dirname(__FILE__) -require 'packet_driver' +require 'equinix_driver' require 'opennebula' deploy_id = ARGV[0] @@ -57,12 +57,12 @@ host = ARGV[1] id = ARGV[2] begin - packet_drv = PacketDriver.new(host) - packet_drv.poll(deploy_id) + equinix_drv = EquinixDriver.new(host) + equinix_drv.poll(deploy_id) rescue Exception => e STDERR.puts < e STDERR.puts < e STDERR.puts < e STDERR.puts <