api: Update pull.sh, regenerate schemas and fix errors
This adds missing schema links to the `pull.sh` script, pulls new schema definitions, re-generates schemas and updates the code where needed.
This commit is contained in:
parent
0b1abb57b9
commit
855f1430ad
17 changed files with 6320 additions and 5881 deletions
|
|
@ -232,7 +232,7 @@ export const TargetEnvAWSList = () => {
|
|||
},
|
||||
{
|
||||
selectFromResult: ({ data }) => ({
|
||||
source: data?.data?.find((source) => source.id === sourceId),
|
||||
source: data?.data?.find((source) => source?.id === sourceId),
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
|
@ -364,7 +364,7 @@ export const TargetEnvAzureList = () => {
|
|||
<Content component={ContentVariants.dd}>
|
||||
{
|
||||
rawAzureSources?.data?.find(
|
||||
(source) => source.id === azureSource
|
||||
(source) => source?.id === azureSource
|
||||
)?.name
|
||||
}
|
||||
</Content>
|
||||
|
|
|
|||
|
|
@ -36,18 +36,18 @@ export const AwsSourcesSelect = () => {
|
|||
});
|
||||
|
||||
const sources = data?.data;
|
||||
const chosenSource = sources?.find((source) => source.id === sourceId);
|
||||
const chosenSource = sources?.find((source) => source?.id === sourceId);
|
||||
|
||||
const [selectOptions, setSelectOptions] = useState<(string | undefined)[]>(
|
||||
sources ? sources.map((source) => source.name) : []
|
||||
sources ? sources.map((source) => source?.name) : []
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
let filteredSources = sources?.map((source) => source.name);
|
||||
let filteredSources = sources?.map((source) => source?.name);
|
||||
|
||||
if (sources && filterValue) {
|
||||
filteredSources = sources
|
||||
.map((source) => source.name)
|
||||
.map((source) => source?.name)
|
||||
.filter((source: string) =>
|
||||
String(source).toLowerCase().includes(filterValue.toLowerCase())
|
||||
);
|
||||
|
|
@ -87,7 +87,7 @@ export const AwsSourcesSelect = () => {
|
|||
_event: React.MouseEvent<Element, MouseEvent>,
|
||||
value: string
|
||||
) => {
|
||||
const source = sources?.find((source) => source.name === value);
|
||||
const source = sources?.find((source) => source?.name === value);
|
||||
dispatch(changeAwsSourceId(source?.id));
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export const AzureSourcesSelect = () => {
|
|||
);
|
||||
|
||||
const [selectOptions, setSelectOptions] = useState<(string | undefined)[]>(
|
||||
rawSources?.data?.map((source) => source.name) || []
|
||||
rawSources?.data?.map((source) => source?.name) || []
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -75,11 +75,11 @@ export const AzureSourcesSelect = () => {
|
|||
]);
|
||||
|
||||
useEffect(() => {
|
||||
let filteredSources = rawSources?.data?.map((source) => source.name);
|
||||
let filteredSources = rawSources?.data?.map((source) => source?.name);
|
||||
|
||||
if (filterValue) {
|
||||
filteredSources = rawSources?.data
|
||||
?.map((source) => source.name)
|
||||
?.map((source) => source?.name)
|
||||
.filter((source: string) =>
|
||||
String(source).toLowerCase().includes(filterValue.toLowerCase())
|
||||
);
|
||||
|
|
@ -119,7 +119,7 @@ export const AzureSourcesSelect = () => {
|
|||
sourceName: string
|
||||
) => {
|
||||
const sourceId = rawSources?.data?.find(
|
||||
(source) => source.name === sourceName
|
||||
(source) => source?.name === sourceName
|
||||
)?.id;
|
||||
dispatch(changeAzureSource(sourceId || ''));
|
||||
dispatch(changeAzureResourceGroup(''));
|
||||
|
|
@ -145,7 +145,7 @@ export const AzureSourcesSelect = () => {
|
|||
};
|
||||
|
||||
const selectedSource = azureSource
|
||||
? rawSources?.data?.find((source) => source.id === azureSource)?.name
|
||||
? rawSources?.data?.find((source) => source?.id === azureSource)?.name
|
||||
: undefined;
|
||||
|
||||
const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const AzureSourceName = ({ id }: AzureSourceNamePropTypes) => {
|
|||
|
||||
const sources = extractProvisioningList(rawSources);
|
||||
|
||||
const sourcename = sources?.find((source) => source.id === id);
|
||||
const sourcename = sources?.find((source) => source?.id === id);
|
||||
if (sourcename) {
|
||||
return <p>{sourcename.name}</p>;
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ const AwsSourceName = ({ id }: AwsSourceNamePropTypes) => {
|
|||
|
||||
const sources = extractProvisioningList(rawSources);
|
||||
|
||||
const sourcename = sources?.find((source) => source.id === id);
|
||||
const sourcename = sources?.find((source) => source?.id === id);
|
||||
if (sourcename) {
|
||||
return <p>{sourcename.name}</p>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -390,6 +390,7 @@ export const AwsS3Instance = ({
|
|||
'rhel-edge-installer': '',
|
||||
vhd: '',
|
||||
oci: '',
|
||||
'openshift-virt': '.tar',
|
||||
};
|
||||
|
||||
const status = composeStatus?.image_status.status;
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ export const targetOptions: { [key in ImageTypes]: string } = {
|
|||
'rhel-edge-installer': 'RHEL Edge Installer',
|
||||
vhd: '',
|
||||
oci: 'Oracle Cloud Infrastructure',
|
||||
'openshift-virt': 'OpenShift Virtualization',
|
||||
};
|
||||
|
||||
export const UNIT_KIB = 1024 ** 1;
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ export type ImageTypes =
|
|||
| "aws-rhui"
|
||||
| "aws-sap-rhui"
|
||||
| "azure"
|
||||
| "azure-cvm"
|
||||
| "azure-eap7-rhui"
|
||||
| "azure-rhui"
|
||||
| "azure-sap-rhui"
|
||||
|
|
@ -536,11 +537,11 @@ export type FilesystemTyped = {
|
|||
*/
|
||||
part_type?: string | undefined;
|
||||
minsize?: Minsize | undefined;
|
||||
mountpoint: string;
|
||||
mountpoint?: string | undefined;
|
||||
label?: string | undefined;
|
||||
/** The filesystem type
|
||||
/** The filesystem type. Swap partitions must have an empty mountpoint.
|
||||
*/
|
||||
fs_type?: ("ext4" | "xfs" | "vfat") | undefined;
|
||||
fs_type: "ext4" | "xfs" | "vfat" | "swap";
|
||||
};
|
||||
export type BtrfsSubvolume = {
|
||||
/** The name of the subvolume, which defines the location (path) on the root volume
|
||||
|
|
@ -551,7 +552,7 @@ export type BtrfsSubvolume = {
|
|||
mountpoint: string;
|
||||
};
|
||||
export type BtrfsVolume = {
|
||||
type?: "btrfs" | undefined;
|
||||
type: "btrfs";
|
||||
/** The partition type GUID for GPT partitions. For DOS partitions, this field can be used to set the (2 hex digit) partition type. If not set, the type will be automatically set based on the mountpoint or the payload type.
|
||||
*/
|
||||
part_type?: string | undefined;
|
||||
|
|
@ -563,14 +564,14 @@ export type LogicalVolume = {
|
|||
minsize?: Minsize | undefined;
|
||||
/** Mountpoint for the logical volume
|
||||
*/
|
||||
mountpoint: string;
|
||||
mountpoint?: string | undefined;
|
||||
label?: string | undefined;
|
||||
/** The filesystem type for the logical volume
|
||||
/** The filesystem type for the logical volume. Swap LVs must have an empty mountpoint.
|
||||
*/
|
||||
fs_type?: ("ext4" | "xfs" | "vfat") | undefined;
|
||||
fs_type: "ext4" | "xfs" | "vfat" | "swap";
|
||||
};
|
||||
export type VolumeGroup = {
|
||||
type?: "lvm" | undefined;
|
||||
type: "lvm";
|
||||
/** The partition type GUID for GPT partitions. For DOS partitions, this field can be used to set the (2 hex digit) partition type. If not set, the type will be automatically set based on the mountpoint or the payload type.
|
||||
*/
|
||||
part_type?: string | undefined;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
checkImageName: build.mutation<
|
||||
|
|
@ -92,7 +92,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images/checkImageName`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
createInstallerForImage: build.mutation<
|
||||
|
|
@ -102,7 +102,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images/${queryArg.imageId}/installer`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
createKickStartForImage: build.mutation<
|
||||
|
|
@ -112,7 +112,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images/${queryArg.imageId}/kickstart`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
getMetadataForImage: build.query<
|
||||
|
|
@ -134,7 +134,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images/${queryArg.imageId}/retry`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
createImageUpdate: build.mutation<
|
||||
|
|
@ -144,7 +144,7 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
query: (queryArg) => ({
|
||||
url: `/images/${queryArg.imageId}/update`,
|
||||
method: "POST",
|
||||
body: queryArg.createImage,
|
||||
body: queryArg.modelsCreateImageApi,
|
||||
}),
|
||||
}),
|
||||
getImageByOstree: build.query<
|
||||
|
|
@ -239,13 +239,13 @@ export type GetAllImagesApiArg = {
|
|||
export type CreateImageApiResponse = /** status 200 OK */ ImageResponse;
|
||||
export type CreateImageApiArg = {
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type CheckImageNameApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
export type CheckImageNameApiArg = {
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type CreateInstallerForImageApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
|
|
@ -253,7 +253,7 @@ export type CreateInstallerForImageApiArg = {
|
|||
/** Image ID */
|
||||
imageId: number;
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type CreateKickStartForImageApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
|
|
@ -261,7 +261,7 @@ export type CreateKickStartForImageApiArg = {
|
|||
/** Image ID */
|
||||
imageId: number;
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type GetMetadataForImageApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
|
|
@ -281,7 +281,7 @@ export type RetryCreateImageApiArg = {
|
|||
/** Image ID */
|
||||
imageId: number;
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type CreateImageUpdateApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
|
|
@ -289,7 +289,7 @@ export type CreateImageUpdateApiArg = {
|
|||
/** Image ID */
|
||||
imageId: number;
|
||||
/** request body */
|
||||
createImage: CreateImage;
|
||||
modelsCreateImageApi: ModelsCreateImageApi;
|
||||
};
|
||||
export type GetImageByOstreeApiResponse =
|
||||
/** status 200 OK */ ModelsSuccessPlaceholderResponse;
|
||||
|
|
@ -308,10 +308,7 @@ export type GormDeletedAt = {
|
|||
valid?: boolean | undefined;
|
||||
};
|
||||
export type ModelsInstalledPackage = {
|
||||
CreatedAt?: ModelsEdgeApiTime | undefined;
|
||||
DeletedAt?: GormDeletedAt | undefined;
|
||||
ID?: number | undefined;
|
||||
UpdatedAt?: ModelsEdgeApiTime | undefined;
|
||||
arch?: string | undefined;
|
||||
commits?: ModelsCommit[] | undefined;
|
||||
epoch?: string | undefined;
|
||||
|
|
@ -326,9 +323,17 @@ export type ModelsRepo = {
|
|||
CreatedAt?: ModelsEdgeApiTime | undefined;
|
||||
DeletedAt?: GormDeletedAt | undefined;
|
||||
ID?: number | undefined;
|
||||
/** AWS repo upload status */
|
||||
RepoStatus?: string | undefined;
|
||||
/** AWS repo URL */
|
||||
RepoURL?: string | undefined;
|
||||
UpdatedAt?: ModelsEdgeApiTime | undefined;
|
||||
/** Pulp Repo ID (used for updates) */
|
||||
pulp_repo_id?: string | undefined;
|
||||
/** Status of Pulp repo import */
|
||||
pulp_repo_status?: string | undefined;
|
||||
/** Distribution URL returned from Pulp */
|
||||
pulp_repo_url?: string | undefined;
|
||||
};
|
||||
export type ModelsCommit = {
|
||||
Account?: string | undefined;
|
||||
|
|
@ -422,6 +427,7 @@ export type ModelsImage = {
|
|||
TotalPackages?: number | undefined;
|
||||
UpdatedAt?: ModelsEdgeApiTime | undefined;
|
||||
Version?: number | undefined;
|
||||
activationKey?: string | undefined;
|
||||
org_id?: string | undefined;
|
||||
/** storing for logging reference on resume */
|
||||
request_id?: string | undefined;
|
||||
|
|
@ -547,11 +553,12 @@ export type ImageResponse = {
|
|||
TotalPackages?: number | undefined;
|
||||
UpdatedAt?: ModelsEdgeApiTime | undefined;
|
||||
Version?: number | undefined;
|
||||
activationKey?: string | undefined;
|
||||
org_id?: string | undefined;
|
||||
/** storing for logging reference on resume */
|
||||
request_id?: string | undefined;
|
||||
};
|
||||
export type CreateImage = object;
|
||||
export type ModelsCreateImageApi = object;
|
||||
export const {
|
||||
useListAllImageSetsQuery,
|
||||
useGetImageSetsViewQuery,
|
||||
|
|
|
|||
|
|
@ -462,6 +462,7 @@ export type ImageTypes =
|
|||
| "guest-image"
|
||||
| "image-installer"
|
||||
| "oci"
|
||||
| "openshift-virt"
|
||||
| "vsphere"
|
||||
| "vsphere-ova"
|
||||
| "wsl"
|
||||
|
|
@ -998,14 +999,12 @@ export type DistributionProfileItem =
|
|||
export type DistributionProfileResponse = DistributionProfileItem[];
|
||||
export type RecommendationsResponse = {
|
||||
packages: string[];
|
||||
/** Version of the recommendation model used */
|
||||
modelVersion?: string | undefined;
|
||||
};
|
||||
export type RecommendPackageRequest = {
|
||||
packages: string[];
|
||||
recommendedPackages: number;
|
||||
/** RHEL major release (e.g. "rhel8", "rhel9", "rhel10") */
|
||||
distribution?: string | undefined;
|
||||
distribution: string;
|
||||
};
|
||||
export const {
|
||||
useGetArchitecturesQuery,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ const injectedRtkApi = api.injectEndpoints({
|
|||
url: `/sources`,
|
||||
params: {
|
||||
provider: queryArg.provider,
|
||||
limit: queryArg.limit,
|
||||
offset: queryArg.offset,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
|
@ -23,6 +25,10 @@ export type GetSourceListApiResponse =
|
|||
/** status 200 Returned on success. */ V1ListSourceResponse;
|
||||
export type GetSourceListApiArg = {
|
||||
provider?: "aws" | "azure" | "gcp";
|
||||
/** The number of items to return. */
|
||||
limit?: number;
|
||||
/** The number of items to skip before starting to collect the result set. */
|
||||
offset?: number;
|
||||
};
|
||||
export type GetSourceUploadInfoApiResponse =
|
||||
/** status 200 Return on success. */ V1SourceUploadInfoResponse;
|
||||
|
|
@ -32,12 +38,26 @@ export type GetSourceUploadInfoApiArg = {
|
|||
};
|
||||
export type V1ListSourceResponse = {
|
||||
data?:
|
||||
| {
|
||||
| ({
|
||||
id?: string | undefined;
|
||||
name?: string | undefined;
|
||||
/** One of ('azure', 'aws', 'gcp') */
|
||||
provider?: string | undefined;
|
||||
source_type_id?: string | undefined;
|
||||
status?: string | undefined;
|
||||
uid?: string | undefined;
|
||||
}[]
|
||||
} | null)[]
|
||||
| undefined;
|
||||
metadata?:
|
||||
| {
|
||||
links?:
|
||||
| {
|
||||
next?: string | undefined;
|
||||
previous?: string | undefined;
|
||||
}
|
||||
| undefined;
|
||||
total?: number | undefined;
|
||||
}
|
||||
| undefined;
|
||||
};
|
||||
export type V1ResponseError = {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ export type CreateActivationKeysApiArg = {
|
|||
repositoryLabel?: string | undefined;
|
||||
}[]
|
||||
| undefined;
|
||||
/** should be 255 characters or shorter */
|
||||
description?: string | undefined;
|
||||
/** Name should be present, unique and can only contain letters, numbers, underscores, or hyphens */
|
||||
name: string;
|
||||
releaseVersion?: string | undefined;
|
||||
|
|
@ -59,15 +61,16 @@ export type ShowActivationKeyApiArg = {
|
|||
};
|
||||
export type AdditionalRepositories = {
|
||||
repositoryLabel?: string | undefined;
|
||||
repositoryName?: string | undefined;
|
||||
};
|
||||
export type ActivationKeys = {
|
||||
additionalRepositories?: AdditionalRepositories[] | undefined;
|
||||
description?: string | undefined;
|
||||
id?: string | undefined;
|
||||
name?: string | undefined;
|
||||
releaseVersion?: string | undefined;
|
||||
role?: string | undefined;
|
||||
serviceLevel?: string | undefined;
|
||||
updatedAt?: string | undefined;
|
||||
usage?: string | undefined;
|
||||
};
|
||||
export type ErrorDetails = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue