Skip to content

Commit

Permalink
Merge pull request #971 from flatcar/krnowak/drop-niftycloud-and-inte…
Browse files Browse the repository at this point in the history
…route

Drop niftycloud and interoute OEM support
  • Loading branch information
krnowak authored Jul 5, 2023
2 parents 3a879fb + f9ed388 commit c1c90fc
Show file tree
Hide file tree
Showing 41 changed files with 54 additions and 841 deletions.
7 changes: 0 additions & 7 deletions build_library/disk_layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,6 @@
"type":"0fc63daf-8483-4772-8e79-3d69d8477de4",
"blocks":"12582912"
}
},
"interoute":{
"9":{
"label":"ROOT",
"fs_label":"ROOT",
"blocks":"33845248"
}
}
}
}
116 changes: 0 additions & 116 deletions build_library/niftycloud_ovf.sh

This file was deleted.

109 changes: 0 additions & 109 deletions build_library/template_interoute.ovf

This file was deleted.

56 changes: 0 additions & 56 deletions build_library/vm_image_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ VALID_IMG_TYPES=(
exoscale
gce
hyperv
interoute
iso
niftycloud
openstack
openstack_mini
packet
Expand Down Expand Up @@ -53,8 +51,6 @@ VALID_OEM_PACKAGES=(
exoscale
gce
hyperv
interoute
niftycloud
packet
qemu
rackspace
Expand Down Expand Up @@ -293,26 +289,13 @@ IMG_azure_OEM_SYSEXT=oem-azure
IMG_hyperv_DISK_FORMAT=vhd
IMG_hyperv_OEM_PACKAGE=oem-hyperv

## niftycloud
IMG_niftycloud_DISK_FORMAT=vmdk_stream
IMG_niftycloud_DISK_LAYOUT=vm
IMG_niftycloud_CONF_FORMAT=niftycloud
IMG_niftycloud_OEM_PACKAGE=oem-niftycloud

## cloudsigma
IMG_cloudsigma_DISK_FORMAT=qcow2
IMG_cloudsigma_OEM_PACKAGE=oem-cloudsigma

## packet
IMG_packet_OEM_PACKAGE=oem-packet

## interoute
IMG_interoute_DISK_FORMAT=vmdk_stream
IMG_interoute_DISK_LAYOUT=interoute
IMG_interoute_CONF_FORMAT=interoute
IMG_interoute_OEM_PACKAGE=oem-interoute
IMG_interoute_BUNDLE_FORMAT=ova

###########################################################

# Print the default vm type for the specified board
Expand Down Expand Up @@ -1123,26 +1106,6 @@ _write_gce_conf() {
VM_GENERATED_FILES=( "${tar_path}" )
}

_write_niftycloud_conf() {
local vm_mem="${1:-$(_get_vm_opt MEM)}"
local src_name=$(basename "$VM_SRC_IMG")
local dst_name=$(basename "$VM_DST_IMG")
local ovf="$(_dst_dir)/$(_src_to_dst_name "${src_name}" ".ovf")"

"${BUILD_LIBRARY_DIR}/niftycloud_ovf.sh" \
--vm_name "$VM_NAME" \
--disk_vmdk "$VM_DST_IMG" \
--memory_size "$vm_mem" \
--output_ovf "$ovf"

local ovf_name=$(basename "${ovf}")
cat > "${VM_README}" <<EOF
Import ${ovf_name} and ${dst_name} to NIFTY Cloud.
EOF

VM_GENERATED_FILES+=( "$ovf" )
}

_write_ovf_vmware_conf() {
local vm_mem="${1:-$(_get_vm_opt MEM)}"
local vm_cpus="$(_get_vm_opt CPUS)"
Expand All @@ -1162,25 +1125,6 @@ _write_ovf_vmware_conf() {
VM_GENERATED_FILES+=( "$ovf" )
}

_write_interoute_conf() {
local vm_mem="${1:-$(_get_vm_opt MEM)}"
local vm_cpus="$(_get_vm_opt CPUS)"
local vmdk_file_size=$(du --bytes "${VM_DST_IMG}" | cut -f1)
local vmdk_capacity=$(vmdk-convert -i "${VM_DST_IMG}" | jq .capacity)
local ovf="$(_dst_path ".ovf")"

sed "${BUILD_LIBRARY_DIR}/template_interoute.ovf" \
-e "s/@@NAME@@/$(_dst_name)/g" \
-e "s/@@VMDK_FILE_NAME@@/$(basename ${VM_DST_IMG})/g" \
-e "s/@@VMDK_FILE_SIZE@@/${vmdk_file_size}/g" \
-e "s/@@VMDK_CAPACITY@@/${vmdk_capacity}/g" \
-e "s/@@NUM_CPUS@@/${vm_cpus}/g" \
-e "s/@@MEM_SIZE@@/${vm_mem}/g" \
> "${ovf}"

VM_GENERATED_FILES+=( "$ovf" )
}

# If this is a bundled format generate it!
write_vm_bundle() {
local bundle_format=$(_get_vm_opt BUNDLE_FORMAT)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- :warning: Dropped support for niftycloud and interoute. For interoute we haven't been generating the images for some time already. (TODO) :warning:
Loading

0 comments on commit c1c90fc

Please sign in to comment.