-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
* pods - part 1 * pods - part 2 * pods - part3 - delete pod working * pods - part 4 - create pod working * Force json details to expand to length of json * pods - part 5 - newest package.json * Pods, fixes for tests. * Adding latest package-lock.json * Fix linting * Ran `npm run prettier` and then `npm run lint` * Removing vestigial references to systems. Fix in PodToolbar. Removing unused PodListing.
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export const tapisPod = { | ||
pod_id: 'testpod2', | ||
pod_template: 'template/postgres', | ||
description: 'Test pod fixture for testing', | ||
command: undefined, | ||
environment_variables: {}, | ||
data_requests: [], | ||
roles_required: [], | ||
status_requested: 'ON', | ||
volume_mounts: { | ||
test4: { | ||
type: 'tapisvolume', | ||
mount_path: '/var/lib/postgresql/data', | ||
sub_path: '', | ||
}, | ||
}, | ||
time_to_stop_default: -1, | ||
time_to_stop_instance: undefined, | ||
networking: { | ||
default: { | ||
protocol: 'postgres', | ||
port: 5432, | ||
url: 'test4.pods.tacc.develop.tapis.io', | ||
}, | ||
}, | ||
resources: { | ||
cpu_request: 250, | ||
cpu_limit: 2000, | ||
mem_request: 256, | ||
mem_limit: 3072, | ||
gpus: 0, | ||
}, | ||
time_to_stop_ts: null, | ||
status: 'AVAILABLE', | ||
status_container: { | ||
phase: 'Running', | ||
start_time: '2024-02-13T20:58:32.000000', | ||
message: 'Pod is running.', | ||
}, | ||
data_attached: [], | ||
roles_inherited: [], | ||
creation_ts: '2024-02-13T20:58:31.358557', | ||
update_ts: '2024-02-13T20:58:31.358649', | ||
start_instance_ts: '2024-02-13T20:59:08.175504', | ||
action_logs: [ | ||
"24/02/13 20:58: Pod object created by 'cgarcia'", | ||
'24/02/13 20:58: spawner set status to CREATING', | ||
'24/02/13 20:59: health set status to AVAILABLE', | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Pods } from '@tapis/tapis-typescript'; | ||
import { apiGenerator, errorDecoder } from 'tapis-api/utils'; | ||
|
||
const deletePod = (podId: string, basePath: string, jwt: string) => { | ||
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>( | ||
Pods, | ||
Pods.PodsApi, | ||
basePath, | ||
jwt | ||
); | ||
return errorDecoder<Pods.DeletePodResponse>(() => api.deletePod({ podId })); | ||
}; | ||
|
||
export default deletePod; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Pods } from '@tapis/tapis-typescript'; | ||
import { apiGenerator, errorDecoder } from 'tapis-api/utils'; | ||
|
||
const details = (params: Pods.GetPodRequest, basePath: string, jwt: string) => { | ||
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>( | ||
Pods, | ||
Pods.PodsApi, | ||
basePath, | ||
jwt | ||
); | ||
return errorDecoder<Pods.PodResponse>(() => api.getPod(params)); | ||
}; | ||
|
||
export default details; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { default as list } from './list'; | ||
export { default as details } from './details'; | ||
export { default as makeNewPod } from './makeNewPod'; | ||
export { default as deletePod } from './deletePod'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Pods } from '@tapis/tapis-typescript'; | ||
import { apiGenerator, errorDecoder } from 'tapis-api/utils'; | ||
|
||
const list = (params: {}, basePath: string, jwt: string) => { | ||
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>( | ||
Pods, | ||
Pods.PodsApi, | ||
basePath, | ||
jwt | ||
); | ||
return errorDecoder<Pods.PodsResponse>(() => api.getPods()); | ||
}; | ||
|
||
export default list; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Pods } from '@tapis/tapis-typescript'; | ||
import { apiGenerator, errorDecoder } from 'tapis-api/utils'; | ||
|
||
const makeNewPod = ( | ||
reqCreatePod: Pods.CreatePodRequest, | ||
basePath: string, | ||
jwt: string | ||
) => { | ||
const api: Pods.PodsApi = apiGenerator<Pods.PodsApi>( | ||
Pods, | ||
Pods.PodsApi, | ||
basePath, | ||
jwt | ||
); | ||
return errorDecoder<Pods.PodResponse>(() => api.createPod(reqCreatePod)); | ||
}; | ||
|
||
export default makeNewPod; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.