1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

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 <sbetanzos@opennebula.io>
This commit is contained in:
Alejandro Huertas Herrero 2021-09-17 09:51:14 +02:00 committed by GitHub
parent 77276366a8
commit 03d43d399c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 232 additions and 261 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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

View File

@ -16,5 +16,4 @@
# ---------------------------------------------------------------------------- #
image: 'OPENNEBULA-EQUINIX'
provider: 'packet'
provision_type: 'metal'
provider: 'equinix'

View File

@ -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'

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -17,4 +17,3 @@
image: 'OPENNEBULA-DIGITALOCEAN'
provider: 'digitalocean'
provision_type: 'virtual'

View File

@ -17,4 +17,3 @@
image: 'OPENNEBULA-VULTR'
provider: 'vultr_virtual'
provision_type: 'virtual'

View File

@ -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

View File

@ -1,4 +1,4 @@
name: 'Packet'
name: 'Equinix'
image: 'EQUINIX'
provision_type: 'metal'
location_key: 'facility'

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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',

View File

@ -27,8 +27,8 @@
# XML format
# <IPAM_DRIVER_ACTION_DATA>
# <AR>
# <DEPLOY_ID>Packet AR ID</DEPLOY_ID>
# <PACKET_TOKEN>Packet auth token</PACKET_TOKEN>
# <DEPLOY_ID>Equinix AR ID</DEPLOY_ID>
# <EQUINIX_TOKEN>Equinix auth token</EQUINIX_TOKEN>
# </AR>
# <ADDRESS>
# <IP>

View File

@ -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

View File

@ -25,8 +25,8 @@
# XML format
# <IPAM_DRIVER_ACTION_DATA>
# <AR>
# <DEPLOY_ID>Packet AR ID</DEPLOY_ID>
# <PACKET_TOKEN>Packet auth token</PACKET_TOKEN>
# <DEPLOY_ID>Equinix AR ID</DEPLOY_ID>
# <EQUINIX_TOKEN>Equinix auth token</EQUINIX_TOKEN>
# </AR>
# </IPAM_DRIVER_ACTION_DATA>
#
@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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 <<EOT

View File

@ -49,7 +49,7 @@ end
$LOAD_PATH << File.dirname(__FILE__)
$LOAD_PATH << RUBY_LIB_LOCATION
require 'packet_driver'
require 'equinix_driver'
require 'opennebula'
dfile = ARGV[0]
@ -62,13 +62,13 @@ begin
vm = OpenNebula::VirtualMachine.new_with_id(id, OpenNebula::Client.new)
vm.info
packet_drv = PacketDriver.new(host)
equinix_drv = EquinixDriver.new(host)
text = File.read(dfile)
puts packet_drv.deploy_vm(id, host, text, vm.lcm_state_str, vm.deploy_id)
puts equinix_drv.deploy_vm(id, host, text, vm.lcm_state_str, vm.deploy_id)
rescue Exception => e
STDERR.puts <<EOT
Deploy of VM #{id} on Packet host #{host} with #{dfile} failed due to "#{e.message}"
Deploy of VM #{id} on Equinix host #{host} with #{dfile} failed due to "#{e.message}"
#{e.backtrace}"
EOT

View File

@ -20,15 +20,15 @@ ONE_LOCATION ||= ENV['ONE_LOCATION'] unless defined? ONE_LOCATION
if !ONE_LOCATION
GEMS_LOCATION ||= '/usr/share/one/gems'
PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
VAR_LOCATION ||= '/var/lib/one/'
else
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
VAR_LOCATION ||= ONE_LOCATION + '/var/'
end
PACKET_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/packet.d/packet-cache.db"
EQUINIX_DATABASE_PATH = "#{VAR_LOCATION}/remotes/im/equinix.d/equinix-cache.db"
# %%RUBYGEMS_SETUP_BEGIN%%
if File.directory?(GEMS_LOCATION)
@ -50,7 +50,7 @@ if File.directory?(GEMS_LOCATION)
end
# %%RUBYGEMS_SETUP_END%%
$LOAD_PATH << PACKET_LOCATION
$LOAD_PATH << EQUINIX_LOCATION
require 'packet'
require 'VirtualMachineDriver'
@ -60,17 +60,17 @@ require 'opennebula'
### Exceptions
class PacketDriverTimeout < RuntimeError
class EquinixDriverTimeout < RuntimeError
end
class PacketDriverDeviceNotFound < RuntimeError
class EquinixDriverDeviceNotFound < RuntimeError
end
class PacketDriverInvalidDeviceState < RuntimeError
class EquinixDriverInvalidDeviceState < RuntimeError
end
### Packet driver
class PacketDriver
### Equinix driver
class EquinixDriver
include PublicCloudDriver
@ -105,8 +105,8 @@ class PacketDriver
def initialize(host, id = nil, one = OpenNebula::Client.new)
@one = one
@hypervisor = 'packet'
@packet = Packet::Client.new
@hypervisor = 'equinix'
@equinix = Packet::Client.new
host = host['NAME'] unless host.is_a?(String)
@ -114,9 +114,9 @@ class PacketDriver
@xmlhost = host_info(host, id)
@globals = get_globals(@xmlhost)
@packet.auth_token = @globals['PACKET_TOKEN']
@equinix.auth_token = @globals['EQUINIX_TOKEN']
@db = InstanceCache.new(PACKET_DATABASE_PATH)
@db = InstanceCache.new(EQUINIX_DATABASE_PATH)
end
def deploy_vm(_id, _host, xml_text, lcm_state, deploy_id)
@ -132,11 +132,11 @@ class PacketDriver
device = xobj2device(xvm, 'USER_TEMPLATE/PUBLIC_CLOUD',
'TEMPLATE/CONTEXT')
device.tags += ['OpenNebula', "ONE_ID=#{xvm['ID']}"]
@packet.create_device(device)
@equinix.create_device(device)
begin
wait_state(:active, device.id)
rescue PacketDriverTimeout
rescue EquinixDriverTimeout
nil
end
@ -218,10 +218,10 @@ class PacketDriver
tx = 0
begin
# @packet.get("devices/#{device.id}/bandwidth"
# @equinix.get("devices/#{device.id}/bandwidth"
# {'from'=>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

View File

@ -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 <<EOT
Cannot poll info for VM #{id} on Packet host #{host} due to "#{e.message}"
Cannot poll info for VM #{id} on Equinix host #{host} due to "#{e.message}"
#{e.backtrace}"
EOT

View File

@ -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]
@ -57,12 +57,12 @@ host = ARGV[1]
vm_id = ARGV[2]
begin
packet_drv = PacketDriver.new(host)
packet_drv.reboot(deploy_id)
equinix_drv = EquinixDriver.new(host)
equinix_drv.reboot(deploy_id)
rescue Exception => e
STDERR.puts <<EOT
Reboot of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
Reboot of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
#{e.backtrace}"
EOT

View File

@ -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]
@ -57,12 +57,12 @@ host = ARGV[1]
vm_id = ARGV[2]
begin
packet_drv = PacketDriver.new(host)
packet_drv.reset(deploy_id)
equinix_drv = EquinixDriver.new(host)
equinix_drv.reset(deploy_id)
rescue Exception => e
STDERR.puts <<EOT
Reset of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
Reset of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
#{e.backtrace}"
EOT

View File

@ -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]
@ -61,12 +61,12 @@ begin
vm = OpenNebula::VirtualMachine.new_with_id(vm_id, one)
vm.info
packet_drv = PacketDriver.new(host)
packet_drv.shutdown(deploy_id, vm.lcm_state_str)
equinix_drv = EquinixDriver.new(host)
equinix_drv.shutdown(deploy_id, vm.lcm_state_str)
rescue Exception => e
STDERR.puts <<EOT
Shutdown of VM #{vm_id} on Packet host #{host} failed due to "#{e.message}"
Shutdown of VM #{vm_id} on Equinix host #{host} failed due to "#{e.message}"
#{e.backtrace}"
EOT

View File

@ -181,15 +181,15 @@ class ElasticDriver < VNMMAD::VNMDriver
# Factory method to create a VNM provider for the host provision
# @param host [OpenNebula::Host]
# @return [AWSProvider, PacketProvider, nil] nil
# @return [AWSProvider, EquinixProvider, nil] nil
def self.provider(provider, host)
case provider.body['provider']
when 'aws'
require 'aws_vnm'
AWSProvider.new(provider, host)
when 'packet'
require 'packet_vnm'
PacketProvider.new(provider, host)
when 'equinix'
require 'equinix_vnm'
EquinixProvider.new(provider, host)
when 'vultr_virtual', 'vultr_metal'
require 'vultr_vnm'
VultrProvider.new(provider, host)

View File

@ -20,12 +20,12 @@ if !ONE_LOCATION
LIB_LOCATION ||= '/usr/lib/one'
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
GEMS_LOCATION ||= '/usr/share/one/gems'
PACKET_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
EQUINIX_LOCATION ||= '/usr/lib/one/ruby/vendors/packethost/lib'
else
LIB_LOCATION ||= ONE_LOCATION + '/lib'
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
PACKET_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
EQUINIX_LOCATION ||= ONE_LOCATION + '/lib/ruby/vendors/packethost/lib'
end
# %%RUBYGEMS_SETUP_BEGIN%%
@ -49,12 +49,12 @@ end
# %%RUBYGEMS_SETUP_END%%
$LOAD_PATH << RUBY_LIB_LOCATION
$LOAD_PATH << PACKET_LOCATION
$LOAD_PATH << EQUINIX_LOCATION
require 'packet'
# Class covering Packet/Equinix functionality for Elastic driver
class PacketProvider
# Class covering Equinix functionality for Elastic driver
class EquinixProvider
def initialize(provider, host)
connect = provider.body['connection']