-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b242112
commit b316362
Showing
11 changed files
with
380 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/kuttl/test-suites/default/cell-delete-tests/00-cleanup-nova.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../common/cleanup-nova.yaml |
140 changes: 140 additions & 0 deletions
140
test/kuttl/test-suites/default/cell-delete-tests/01-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
apiVersion: nova.openstack.org/v1beta1 | ||
kind: Nova | ||
metadata: | ||
finalizers: | ||
- openstack.org/nova | ||
name: nova-kuttl | ||
namespace: nova-kuttl-default | ||
status: | ||
apiServiceReadyCount: 1 | ||
metadataServiceReadyCount: 1 | ||
schedulerServiceReadyCount: 1 | ||
conditions: | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: Ready | ||
- message: Input data complete | ||
reason: Ready | ||
status: "True" | ||
type: InputReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: KeystoneServiceReady | ||
- message: MariaDBAccount creation complete | ||
reason: Ready | ||
status: "True" | ||
type: MariaDBAccountReady | ||
- message: ' Memcached instance has been provisioned' | ||
reason: Ready | ||
status: "True" | ||
type: MemcachedReady | ||
- message: DB create completed | ||
reason: Ready | ||
status: "True" | ||
type: NovaAPIDBReady | ||
- message: API message bus creation successfully | ||
reason: Ready | ||
status: "True" | ||
type: NovaAPIMQReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: NovaAPIReady | ||
- message: All DBs created successfully | ||
reason: Ready | ||
status: "True" | ||
type: NovaAllCellDBReady | ||
- message: All NovaCells are ready | ||
reason: Ready | ||
status: "True" | ||
type: NovaAllCellReady | ||
- message: All message busses created successfully | ||
reason: Ready | ||
status: "True" | ||
type: NovaAllCellsMQReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: NovaMetadataReady | ||
- message: Setup complete | ||
reason: Ready | ||
status: "True" | ||
type: NovaSchedulerReady | ||
- message: RoleBinding created | ||
reason: Ready | ||
status: "True" | ||
type: RoleBindingReady | ||
- message: Role created | ||
reason: Ready | ||
status: "True" | ||
type: RoleReady | ||
- message: ServiceAccount created | ||
reason: Ready | ||
status: "True" | ||
type: ServiceAccountReady | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
annotations: | ||
openshift.io/scc: anyuid | ||
labels: | ||
service: nova-api | ||
name: nova-kuttl-api-0 | ||
status: | ||
containerStatuses: | ||
- name: nova-kuttl-api-api | ||
ready: true | ||
started: true | ||
- name: nova-kuttl-api-log | ||
ready: true | ||
started: true | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
annotations: | ||
openshift.io/scc: anyuid | ||
labels: | ||
service: nova-metadata | ||
statefulset.kubernetes.io/pod-name: nova-kuttl-metadata-0 | ||
name: nova-kuttl-metadata-0 | ||
ownerReferences: | ||
- apiVersion: apps/v1 | ||
blockOwnerDeletion: true | ||
controller: true | ||
kind: StatefulSet | ||
name: nova-kuttl-metadata | ||
status: | ||
containerStatuses: | ||
- name: nova-kuttl-metadata-log | ||
ready: true | ||
started: true | ||
- name: nova-kuttl-metadata-metadata | ||
ready: true | ||
started: true | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nova-kuttl-cell1-compute-fake1-compute-0 | ||
status: | ||
containerStatuses: | ||
- name: nova-kuttl-cell1-compute-fake1-compute-compute | ||
ready: true | ||
started: true | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
namespaced: true | ||
commands: | ||
- script: | | ||
set -euxo pipefail | ||
MESSAGE=$(oc exec -n $NAMESPACE openstackclient -- openstack flavor create my-flavor 2>&1) || true | ||
echo $MESSAGE | grep "Policy doesn't allow os_compute_api:os-flavor-manage:create to be performed" | ||
- script: | | ||
set -euxo pipefail | ||
RP_UUID=$(oc exec -n $NAMESPACE openstackclient -- openstack resource provider list --name nova-kuttl-cell1-compute-fake1-compute-0 -f value -c uuid) | ||
oc exec -n $NAMESPACE openstackclient -- openstack resource provider trait list $RP_UUID | grep CUSTOM_FOO |
31 changes: 31 additions & 0 deletions
31
.../kuttl/test-suites/default/cell-delete-tests/01-deploy-with-default-config-overwrite.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: nova.openstack.org/v1beta1 | ||
kind: Nova | ||
metadata: | ||
name: nova-kuttl | ||
spec: | ||
secret: osp-secret | ||
cellTemplates: | ||
cell0: | ||
cellDatabaseInstance: openstack | ||
cellDatabaseAccount: nova-cell0 | ||
cellMessageBusInstance: rabbitmq | ||
hasAPIAccess: true | ||
memcachedInstance: memcached | ||
cell1: | ||
cellDatabaseInstance: openstack-cell1 | ||
cellDatabaseAccount: nova-cell1 | ||
cellMessageBusInstance: rabbitmq-cell1 | ||
memcachedInstance: memcached | ||
novaComputeTemplates: | ||
compute-fake1: | ||
computeDriver: fake.FakeDriver | ||
defaultConfigOverwrite: | ||
provider.yaml: | | ||
meta: | ||
schema_version: '1.0' | ||
providers: | ||
- identification: | ||
uuid: '$COMPUTE_NODE' | ||
traits: | ||
additional: | ||
- 'CUSTOM_FOO' |
Oops, something went wrong.