diff --git a/projects/kypo-sandbox-model/package.json b/projects/kypo-sandbox-model/package.json index d06a0c37e772dc751a483a755261efdb3ee9c735..4e112312b5404399d58e941d407470aa178ceb76 100644 --- a/projects/kypo-sandbox-model/package.json +++ b/projects/kypo-sandbox-model/package.json @@ -1,6 +1,6 @@ { "name": "kypo-sandbox-model", - "version": "10.0.0", + "version": "10.1.0-dev2", "peerDependencies": { "@angular/common": "^10.0.0", "@angular/core": "^10.0.0", diff --git a/projects/kypo-sandbox-model/src/lib/enums/request-stage-type.enum.ts b/projects/kypo-sandbox-model/src/lib/enums/request-stage-type.enum.ts index 791bcaf6db67f6753964c54cd64f325eed0cc83f..cc44a91c2de16e4f11815d98461712656f42f0a4 100644 --- a/projects/kypo-sandbox-model/src/lib/enums/request-stage-type.enum.ts +++ b/projects/kypo-sandbox-model/src/lib/enums/request-stage-type.enum.ts @@ -1,6 +1,8 @@ export enum RequestStageType { - OPENSTACK_ALLOCATION, - ANSIBLE_ALLOCATION, - OPENSTACK_CLEANUP, - ANSIBLE_CLEANUP, + OPEN_STACK_ALLOCATION, + NETWORKING_ANSIBLE_ALLOCATION, + USER_ANSIBLE_ALLOCATION, + OPEN_STACK_CLEANUP, + NETWORKING_ANSIBLE_CLEANUP, + USER_ANSIBLE_CLEANUP, } diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-allocation-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-allocation-stage.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfe0247b8ae307836cb211992b3f0d8ed47074fb --- /dev/null +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-allocation-stage.ts @@ -0,0 +1,15 @@ +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); + } +} diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-cleanup-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-cleanup-stage.ts new file mode 100644 index 0000000000000000000000000000000000000000..f890098ab66b18c5ec1c6f6b653fdcdc141059bc --- /dev/null +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/networking-ansible-cleanup-stage.ts @@ -0,0 +1,10 @@ +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); + } +} diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-allocation-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-allocation-stage.ts index 45363e0bbb67a22b1e6341175328934d6a4cb242..61b833746c6ce384ce4ef9a5f1409980d595cfe8 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-allocation-stage.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-allocation-stage.ts @@ -9,6 +9,6 @@ export class OpenStackAllocationStage extends AllocationRequestStage { statusReason: string; constructor() { - super(RequestStageType.OPENSTACK_ALLOCATION); + super(RequestStageType.OPEN_STACK_ALLOCATION); } } diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-cleanup-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-cleanup-stage.ts index 703f83a61801dcf4a360a4349e8874da63fd649d..470bc37d81f481bdac1b7299ae415db9edb63f7a 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-cleanup-stage.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-cleanup-stage.ts @@ -5,6 +5,6 @@ export class OpenStackCleanupStage extends CleanupRequestStage { allocationStageId: number; constructor() { - super(RequestStageType.OPENSTACK_CLEANUP); + super(RequestStageType.OPEN_STACK_CLEANUP); } } diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-event.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-event.ts similarity index 71% rename from projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-event.ts rename to projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-event.ts index fa1eedbd68ae101388db3a179b5689d96f88b0e3..337da08462ceb910f0b7931a413bd94d7d0cbdee 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-event.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-event.ts @@ -1,4 +1,4 @@ -export class OpenstackEvent { +export class OpenStackEvent { time: string; name: string; status: string; diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-resource.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-resource.ts similarity index 76% rename from projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-resource.ts rename to projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-resource.ts index 2caf41910b5c838d422640b002dee055f2ea7320..d1d85655f6e66da61b5c2c2e3cf23fcbdf6f5c77 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/openstack-resource.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/open-stack-resource.ts @@ -2,7 +2,7 @@ * Class representing sandbox instance resource */ -export class OpenstackResource { +export class OpenStackResource { name: string; type: string; status: string; diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-allocation-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-allocation-stage.ts similarity index 70% rename from projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-allocation-stage.ts rename to projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-allocation-stage.ts index 119406c32630ecf68babe8bb02771642780fd836..a3cb41e817b969591feaa7b88178b10d8b411f51 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-allocation-stage.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-allocation-stage.ts @@ -5,11 +5,11 @@ import { AllocationRequestStage } from './allocation-request-stage'; /** * Class representing ansible stage */ -export class AnsibleAllocationStage extends AllocationRequestStage { +export class UserAnsibleAllocationStage extends AllocationRequestStage { repoUrl: string; rev: string; constructor() { - super(RequestStageType.ANSIBLE_ALLOCATION); + super(RequestStageType.USER_ANSIBLE_ALLOCATION); } } diff --git a/projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-cleanup-stage.ts b/projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-cleanup-stage.ts similarity index 61% rename from projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-cleanup-stage.ts rename to projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-cleanup-stage.ts index 5545eb5058f60633846c4003975e66872d294838..a111b6e15700653d8d0abd5aecffd6b7a941e06d 100644 --- a/projects/kypo-sandbox-model/src/lib/pool-request/stage/ansible-cleanup-stage.ts +++ b/projects/kypo-sandbox-model/src/lib/pool-request/stage/user-ansible-cleanup-stage.ts @@ -1,10 +1,10 @@ import { RequestStageType } from '../../enums/request-stage-type.enum'; import { CleanupRequestStage } from './cleanup-request-stage'; -export class AnsibleCleanupStage extends CleanupRequestStage { +export class UserAnsibleCleanupStage extends CleanupRequestStage { allocationStageId: number; constructor() { - super(RequestStageType.ANSIBLE_CLEANUP); + super(RequestStageType.USER_ANSIBLE_CLEANUP); } } diff --git a/projects/kypo-sandbox-model/src/public-api.ts b/projects/kypo-sandbox-model/src/public-api.ts index 6d4e5b30968a0ce4aca6d774eab5c6d609bb1f0f..d547b5f5245c5e323d1e433c8a71a4e4d7ce0283 100644 --- a/projects/kypo-sandbox-model/src/public-api.ts +++ b/projects/kypo-sandbox-model/src/public-api.ts @@ -19,13 +19,15 @@ export { CleanupRequest } from './lib/pool-request/cleanup-request'; // POOL REQUEST STAGES export { AllocationRequestStage } from './lib/pool-request/stage/allocation-request-stage'; -export { AnsibleAllocationStage } from './lib/pool-request/stage/ansible-allocation-stage'; -export { AnsibleCleanupStage } from './lib/pool-request/stage/ansible-cleanup-stage'; +export { NetworkingAnsibleAllocationStage } from './lib/pool-request/stage/networking-ansible-allocation-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 { OpenStackAllocationStage } from './lib/pool-request/stage/open-stack-allocation-stage'; export { OpenStackCleanupStage } from './lib/pool-request/stage/open-stack-cleanup-stage'; -export { OpenstackEvent } from './lib/pool-request/stage/openstack-event'; -export { OpenstackResource } from './lib/pool-request/stage/openstack-resource'; +export { OpenStackEvent } from './lib/pool-request/stage/open-stack-event'; +export { OpenStackResource } from './lib/pool-request/stage/open-stack-resource'; export { RequestStage } from './lib/pool-request/stage/request-stage'; // SANDBOX INSTANCE