From b4f451380cb95898b07981e059ce04e2dab7ae4e Mon Sep 17 00:00:00 2001 From: yaacov Date: Mon, 26 Jun 2023 09:38:51 +0300 Subject: [PATCH] Adjust to new host type name Signed-off-by: yaacov --- packages/mocks/src/definitions/basic/hosts.mock.ts | 14 +++++--------- packages/mocks/src/definitions/utils.ts | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/mocks/src/definitions/basic/hosts.mock.ts b/packages/mocks/src/definitions/basic/hosts.mock.ts index 70bdc1694..7df25b3c1 100644 --- a/packages/mocks/src/definitions/basic/hosts.mock.ts +++ b/packages/mocks/src/definitions/basic/hosts.mock.ts @@ -1,8 +1,4 @@ -import { - HostModelGroupVersionKind as gvk, - V1beta1Host, - VSphereHostInventory, -} from '@kubev2v/types'; +import { HostModelGroupVersionKind as gvk, V1beta1Host, VSphereHost } from '@kubev2v/types'; import { EPOCH, nameAndNamespace, NAMESPACE_FORKLIFT, NAMESPACE_MIGRATION } from '../utils'; @@ -16,7 +12,7 @@ import { } from './providers.mock'; export const HOST_01_ID = 'host-44'; -const host1: VSphereHostInventory = { +const host1: VSphereHost = { id: HOST_01_ID, name: 'esx12.v2v.bos.redhat.com', selfLink: `providers/vsphere/${VMWARE_01_UID}/hosts/${HOST_01_ID}`, @@ -72,7 +68,7 @@ const host1: VSphereHostInventory = { }; export const HOST_02_ID = 'host-29'; -const host2: VSphereHostInventory = { +const host2: VSphereHost = { ...host1, id: HOST_02_ID, name: 'esx13.v2v.bos.redhat.com', @@ -80,14 +76,14 @@ const host2: VSphereHostInventory = { }; export const HOST_03_ID = 'host-57'; -const host3: VSphereHostInventory = { +const host3: VSphereHost = { ...host1, id: 'host-57', name: 'esx14.v2v.bos.redhat.com', selfLink: `providers/vsphere/${VMWARE_03_UID}/hosts/${HOST_03_ID}`, }; -export const MOCK_HOSTS: { [uid in VmwareProviderIDs]: VSphereHostInventory[] } = { +export const MOCK_HOSTS: { [uid in VmwareProviderIDs]: VSphereHost[] } = { [VMWARE_01_UID]: [host1, host2], [VMWARE_02_UID]: [], [VMWARE_03_UID]: [host3], diff --git a/packages/mocks/src/definitions/utils.ts b/packages/mocks/src/definitions/utils.ts index a76e0f704..b79b42f53 100644 --- a/packages/mocks/src/definitions/utils.ts +++ b/packages/mocks/src/definitions/utils.ts @@ -18,7 +18,7 @@ import { ProvidersInventory, V1beta1Provider, VSphereDataStore, - VSphereHostInventory, + VSphereHost, VSphereNetwork, VSphereTreeNode, VSphereVM, @@ -79,7 +79,7 @@ export const hosts = ({ }: { providers: ProvidersInventory; inventoryPath: string; - vsphere: { [uid: string]: VSphereHostInventory[] }; + vsphere: { [uid: string]: VSphereHost[] }; }) => providers.vsphere.map(({ selfLink, uid }) => [ `${inventoryPath}${selfLink}/hosts`,