Skip to content
Snippets Groups Projects
Commit 743f8eaa authored by Martin Hamerník's avatar Martin Hamerník
Browse files

Merge branch '10-add-new-stage-types' into 'master'

Resolve "Add new stage types"

Closes #10

See merge request kypo-crp/frontend-angular/models/kypo-sandbox-model!9
parents 69ab271c 72b3b4ff
Branches
Tags v10.1.0
No related merge requests found
Showing
with 46 additions and 17 deletions
{ {
"name": "kypo-sandbox-model", "name": "kypo-sandbox-model",
"version": "10.0.0", "version": "10.1.0-dev2",
"peerDependencies": { "peerDependencies": {
"@angular/common": "^10.0.0", "@angular/common": "^10.0.0",
"@angular/core": "^10.0.0", "@angular/core": "^10.0.0",
......
export enum RequestStageType { export enum RequestStageType {
OPENSTACK_ALLOCATION, OPEN_STACK_ALLOCATION,
ANSIBLE_ALLOCATION, NETWORKING_ANSIBLE_ALLOCATION,
OPENSTACK_CLEANUP, USER_ANSIBLE_ALLOCATION,
ANSIBLE_CLEANUP, OPEN_STACK_CLEANUP,
NETWORKING_ANSIBLE_CLEANUP,
USER_ANSIBLE_CLEANUP,
} }
import { KypoPaginatedResource } from 'kypo-common';
import { RequestStageType } from '../../enums/request-stage-type.enum';
import { AllocationRequestStage } from './allocation-request-stage';
/**
* Class representing ansible stage
*/
export class NetworkingAnsibleAllocationStage extends AllocationRequestStage {
repoUrl: string;
rev: string;
constructor() {
super(RequestStageType.NETWORKING_ANSIBLE_ALLOCATION);
}
}
import { RequestStageType } from '../../enums/request-stage-type.enum';
import { CleanupRequestStage } from './cleanup-request-stage';
export class NetworkingAnsibleCleanupStage extends CleanupRequestStage {
allocationStageId: number;
constructor() {
super(RequestStageType.NETWORKING_ANSIBLE_CLEANUP);
}
}
...@@ -9,6 +9,6 @@ export class OpenStackAllocationStage extends AllocationRequestStage { ...@@ -9,6 +9,6 @@ export class OpenStackAllocationStage extends AllocationRequestStage {
statusReason: string; statusReason: string;
constructor() { constructor() {
super(RequestStageType.OPENSTACK_ALLOCATION); super(RequestStageType.OPEN_STACK_ALLOCATION);
} }
} }
...@@ -5,6 +5,6 @@ export class OpenStackCleanupStage extends CleanupRequestStage { ...@@ -5,6 +5,6 @@ export class OpenStackCleanupStage extends CleanupRequestStage {
allocationStageId: number; allocationStageId: number;
constructor() { constructor() {
super(RequestStageType.OPENSTACK_CLEANUP); super(RequestStageType.OPEN_STACK_CLEANUP);
} }
} }
export class OpenstackEvent { export class OpenStackEvent {
time: string; time: string;
name: string; name: string;
status: string; status: string;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Class representing sandbox instance resource * Class representing sandbox instance resource
*/ */
export class OpenstackResource { export class OpenStackResource {
name: string; name: string;
type: string; type: string;
status: string; status: string;
......
...@@ -5,11 +5,11 @@ import { AllocationRequestStage } from './allocation-request-stage'; ...@@ -5,11 +5,11 @@ import { AllocationRequestStage } from './allocation-request-stage';
/** /**
* Class representing ansible stage * Class representing ansible stage
*/ */
export class AnsibleAllocationStage extends AllocationRequestStage { export class UserAnsibleAllocationStage extends AllocationRequestStage {
repoUrl: string; repoUrl: string;
rev: string; rev: string;
constructor() { constructor() {
super(RequestStageType.ANSIBLE_ALLOCATION); super(RequestStageType.USER_ANSIBLE_ALLOCATION);
} }
} }
import { RequestStageType } from '../../enums/request-stage-type.enum'; import { RequestStageType } from '../../enums/request-stage-type.enum';
import { CleanupRequestStage } from './cleanup-request-stage'; import { CleanupRequestStage } from './cleanup-request-stage';
export class AnsibleCleanupStage extends CleanupRequestStage { export class UserAnsibleCleanupStage extends CleanupRequestStage {
allocationStageId: number; allocationStageId: number;
constructor() { constructor() {
super(RequestStageType.ANSIBLE_CLEANUP); super(RequestStageType.USER_ANSIBLE_CLEANUP);
} }
} }
...@@ -19,13 +19,15 @@ export { CleanupRequest } from './lib/pool-request/cleanup-request'; ...@@ -19,13 +19,15 @@ export { CleanupRequest } from './lib/pool-request/cleanup-request';
// POOL REQUEST STAGES // POOL REQUEST STAGES
export { AllocationRequestStage } from './lib/pool-request/stage/allocation-request-stage'; export { AllocationRequestStage } from './lib/pool-request/stage/allocation-request-stage';
export { AnsibleAllocationStage } from './lib/pool-request/stage/ansible-allocation-stage'; export { NetworkingAnsibleAllocationStage } from './lib/pool-request/stage/networking-ansible-allocation-stage';
export { AnsibleCleanupStage } from './lib/pool-request/stage/ansible-cleanup-stage'; export { NetworkingAnsibleCleanupStage } from './lib/pool-request/stage/networking-ansible-cleanup-stage';
export { UserAnsibleAllocationStage } from './lib/pool-request/stage/user-ansible-allocation-stage';
export { UserAnsibleCleanupStage } from './lib/pool-request/stage/user-ansible-cleanup-stage';
export { CleanupRequestStage } from './lib/pool-request/stage/cleanup-request-stage'; export { CleanupRequestStage } from './lib/pool-request/stage/cleanup-request-stage';
export { OpenStackAllocationStage } from './lib/pool-request/stage/open-stack-allocation-stage'; export { OpenStackAllocationStage } from './lib/pool-request/stage/open-stack-allocation-stage';
export { OpenStackCleanupStage } from './lib/pool-request/stage/open-stack-cleanup-stage'; export { OpenStackCleanupStage } from './lib/pool-request/stage/open-stack-cleanup-stage';
export { OpenstackEvent } from './lib/pool-request/stage/openstack-event'; export { OpenStackEvent } from './lib/pool-request/stage/open-stack-event';
export { OpenstackResource } from './lib/pool-request/stage/openstack-resource'; export { OpenStackResource } from './lib/pool-request/stage/open-stack-resource';
export { RequestStage } from './lib/pool-request/stage/request-stage'; export { RequestStage } from './lib/pool-request/stage/request-stage';
// SANDBOX INSTANCE // SANDBOX INSTANCE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment