21128: cleanup, renamed some types Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa...
[arvados.git] / src / models / container-request.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { Resource, ResourceKind, ResourceWithProperties } from './resource';
6 import { MountType } from 'models/mount-types';
7 import { RuntimeConstraints } from './runtime-constraints';
8 import { SchedulingParameters } from './scheduling-parameters';
9
10 export enum ContainerRequestState {
11     UNCOMMITTED = 'Uncommitted',
12     COMMITTED = 'Committed',
13     FINAL = 'Final',
14 }
15
16 export interface ContainerRequestResource
17     extends Resource,
18     ResourceWithProperties {
19     command: string[];
20     containerCountMax: number;
21     containerCount: number;
22     containerImage: string;
23     containerUuid: string | null;
24     cumulativeCost: number;
25     cwd: string;
26     description: string;
27     environment: any;
28     expiresAt: string;
29     filters: string;
30     kind: ResourceKind.CONTAINER_REQUEST;
31     logUuid: string | null;
32     mounts: { [path: string]: MountType };
33     name: string;
34     outputName: string;
35     outputPath: string;
36     outputProperties: any;
37     outputStorageClasses: string[];
38     outputTtl: number;
39     outputUuid: string | null;
40     priority: number | null;
41     requestingContainerUuid: string | null;
42     runtimeConstraints: RuntimeConstraints;
43     schedulingParameters: SchedulingParameters;
44     state: ContainerRequestState;
45     useExisting: boolean;
46 }
47
48 // Until the api supports unselecting fields, we need a list of all other fields to omit mounts
49 export const containerRequestFieldsNoMounts = [
50     "command",
51     "container_count_max",
52     "container_count",
53     "container_image",
54     "container_uuid",
55     "created_at",
56     "cumulative_cost",
57     "cwd",
58     "description",
59     "environment",
60     "etag",
61     "expires_at",
62     "filters",
63     "href",
64     "kind",
65     "log_uuid",
66     "modified_at",
67     "modified_by_client_uuid",
68     "modified_by_user_uuid",
69     "name",
70     "output_name",
71     "output_path",
72     "output_properties",
73     "output_storage_classes",
74     "output_ttl",
75     "output_uuid",
76     "owner_uuid",
77     "priority",
78     "properties",
79     "requesting_container_uuid",
80     "runtime_constraints",
81     "scheduling_parameters",
82     "state",
83     "use_existing",
84     "uuid",
85 ];