Skip to content

Commit

Permalink
Adjust to new host type name
Browse files Browse the repository at this point in the history
Signed-off-by: yaacov <yzamir@redhat.com>
  • Loading branch information
yaacov committed Jun 26, 2023
1 parent 853d97d commit b4f4513
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
14 changes: 5 additions & 9 deletions packages/mocks/src/definitions/basic/hosts.mock.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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}`,
Expand Down Expand Up @@ -72,22 +68,22 @@ 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',
selfLink: `providers/vsphere/${VMWARE_01_UID}/hosts/${HOST_02_ID}`,
};

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],
Expand Down
4 changes: 2 additions & 2 deletions packages/mocks/src/definitions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ProvidersInventory,
V1beta1Provider,
VSphereDataStore,
VSphereHostInventory,
VSphereHost,
VSphereNetwork,
VSphereTreeNode,
VSphereVM,
Expand Down Expand Up @@ -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`,
Expand Down

0 comments on commit b4f4513

Please sign in to comment.