Skip to content

Commit

Permalink
Merge pull request #512 from yaacov/rename-providersinventory-to-prov…
Browse files Browse the repository at this point in the history
…idersinventorylist

Rename ProvidersInventory to ProvidersInventoryList
  • Loading branch information
yaacov committed Jun 29, 2023
2 parents da387a2 + 02d1867 commit b448c0a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/mocks/src/definitions/basic/providers.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
OpenstackProvider,
OVirtProvider,
ProviderModelGroupVersionKind as gvk,
ProvidersInventory,
ProvidersInventoryList,
V1beta1Provider,
V1beta1ProviderStatus,
VSphereProvider,
Expand Down Expand Up @@ -451,7 +451,7 @@ export const openshiftProviderHost: OpenshiftProvider = {
},
};

export const MOCK_INVENTORY_PROVIDERS: ProvidersInventory = {
export const MOCK_INVENTORY_PROVIDERS: ProvidersInventoryList = {
vsphere: [vmwareProvider1, vmwareProvider2, vmwareProvider3],
ovirt: [rhvProvider1, rhvProvider1i, rhvProvider2, rhvProvider3],
openstack: [openstackProvider1, openstackProvider2],
Expand Down
18 changes: 9 additions & 9 deletions packages/mocks/src/definitions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
OVirtStorageDomain,
OvirtTreeNode,
OVirtVM,
ProvidersInventory,
ProvidersInventoryList,
V1beta1Provider,
VSphereDataStore,
VSphereHost,
Expand Down Expand Up @@ -44,7 +44,7 @@ export const disks = ({
ovirt,
openstack,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
ovirt: { [uid: string]: OVirtDisk[] };
openstack: OpenstackVolumeType[];
Expand All @@ -62,7 +62,7 @@ export const vms = ({
vsphere,
ovirt,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
vsphere: { [uid: string]: VSphereVM[] };
ovirt: { [uid: string]: OVirtVM[] };
Expand All @@ -77,7 +77,7 @@ export const hosts = ({
inventoryPath,
vsphere,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
vsphere: { [uid: string]: VSphereHost[] };
}) =>
Expand All @@ -91,7 +91,7 @@ export const namespaces = ({
inventoryPath,
openshift,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
openshift: { [uid: string]: OpenShiftNamespace[] };
}) =>
Expand All @@ -107,7 +107,7 @@ export const networks = ({
ovirt,
openshift,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
vsphere: { [uid: string]: VSphereNetwork[] };
ovirt: { [uid: string]: OVirtNetwork[] };
Expand All @@ -128,7 +128,7 @@ export const nicProfiles = ({
inventoryPath,
ovirt,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
ovirt: { [uid: string]: OVirtNicProfile[] };
}) =>
Expand All @@ -145,7 +145,7 @@ export const storages = ({
openstack,
openshift,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
vsphere: { [uid: string]: VSphereDataStore[] };
ovirt: { [uid: string]: OVirtStorageDomain[] };
Expand Down Expand Up @@ -177,7 +177,7 @@ export const trees = ({
ovirt,
openstack,
}: {
providers: ProvidersInventory;
providers: ProvidersInventoryList;
inventoryPath: string;
vsphere: {
hostTree: { [uid: string]: VSphereTreeNode };
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/types/Modify.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Modify<T, R> = Omit<T, keyof R> & R;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { OpenshiftProvider, OpenstackProvider, OVirtProvider, VSphereProvider }
/**
* Represents the inventory of providers, including their entities.
*/
export interface ProvidersInventory {
export interface ProvidersInventoryList {
openshift?: OpenshiftProvider[] | null;
openstack?: OpenstackProvider[] | null;
ovirt?: OVirtProvider[] | null;
Expand Down
3 changes: 2 additions & 1 deletion packages/types/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// @index('./*', f => `export * from '${f.path}';`)
export * from './k8s';
export * from './Modify';
export * from './MustGatherResponse';
export * from './provider';
export * from './ProviderHost';
export * from './ProviderInventory';
export * from './ProviderSecret';
export * from './ProvidersInventory';
export * from './ProvidersInventoryList';
export * from './ProviderVM';
export * from './secret';
// @endindex

0 comments on commit b448c0a

Please sign in to comment.