forked from SatelliteQE/satellite-populate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Satellite-populate nailgun entity examples for issue SatelliteQE#64
- Loading branch information
Showing
32 changed files
with
1,227 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
name: AbsCompResDock | ||
desc: Nailgun test | ||
update_desc: Updated | ||
|
||
actions: | ||
|
||
- model: AbstractComputeResource | ||
register: test_entity | ||
data: | ||
name: "{{ name }}" | ||
description: "{{ desc }}" | ||
provider: Docker | ||
|
||
- action: update | ||
register: test_entity | ||
model: AbstractComputeResource | ||
data: | ||
description: "{{ update_desc }}" | ||
search_query: | ||
name: "{{ entity_name }}" | ||
|
||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_entity.description | ||
- "{{ update_desc }}" | ||
|
||
- action: delete | ||
model: AbstractComputeResource | ||
search_query: | ||
name: "{{ entity_name }}" | ||
|
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,34 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
name: AbsCompResLib | ||
desc: Nailgun test | ||
update_desc: Updated | ||
|
||
actions: | ||
|
||
- model: AbstractComputeResource | ||
register: test_entity | ||
data: | ||
name: "{{ name }}" | ||
description: "{{ desc }}" | ||
provider: Libvirt | ||
|
||
- action: update | ||
register: test_entity | ||
model: AbstractComputeResource | ||
data: | ||
description: "{{ update_desc }}" | ||
search_query: | ||
name: "{{ entity_name }}" | ||
|
||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_entity.description | ||
- "{{ update_desc }}" | ||
|
||
- action: delete | ||
model: AbstractComputeResource | ||
search_query: | ||
name: "{{ entity_name }}" |
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,61 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
org_name: Activation Key Org | ||
key_name: activate | ||
update_name: Activate Key | ||
|
||
actions: | ||
|
||
# Setup | ||
- model: Organization | ||
register: key_org | ||
data: | ||
name: "{{ org_name }}" | ||
label: label | ||
description: Organization for testing activation keys | ||
|
||
# Create | ||
- model: ActivationKey | ||
register: test_key | ||
data: | ||
name: "{{ key_name }}" | ||
max_hosts: 10 | ||
auto_attach: True | ||
unlimited_hosts: False | ||
description: Test activation key | ||
organization: | ||
from_registry: key_org | ||
|
||
# Update | ||
- action: update | ||
register: test_key | ||
model: ActivationKey | ||
data: | ||
name: "{{ update_name }}" | ||
search_query: | ||
name: "{{ key_name }}" | ||
organization: | ||
from_registry: key_org | ||
|
||
# Assert | ||
- action: assertion | ||
log: Checking that Activation Key name was updated | ||
operation: eq | ||
data: | ||
- from_registry: test_key.name | ||
- "{{ update_name }}" | ||
|
||
# Delete | ||
- action: delete | ||
model: ActivationKey | ||
search_query: | ||
name: "{{ update_name }}" | ||
organization: | ||
from_registry: key_org | ||
|
||
# Cleanup | ||
- action: delete | ||
model: Organization | ||
search_query: | ||
name: "{{ org_name }}" |
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,37 @@ | ||
# Testing nailtun entities | ||
|
||
vars: | ||
arch_name: x172-128 | ||
update_name: x43-32 | ||
|
||
actions: | ||
|
||
# Create | ||
- model: Architecture | ||
register: default_arch | ||
data: | ||
name: "{{ arch_name }}" | ||
|
||
# Update | ||
- action: update | ||
register: default_arch | ||
model: Architecture | ||
data: | ||
name: "{{ update_name }}" | ||
search_query: | ||
name: "{{ arch_name }}" | ||
|
||
# Assert | ||
- action: assertion | ||
log: Checking that Architecture name was updated | ||
operation: eq | ||
data: | ||
- from_registry: default_arch.name | ||
- "{{ update_name }}" | ||
|
||
# Delete | ||
- action: delete | ||
model: Architecture | ||
search_query: | ||
name: "{{ update_name }}" | ||
|
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,38 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
book_name: Mark | ||
book_query: last_report and status.enabled = true | ||
|
||
actions: | ||
|
||
# Create | ||
- model: Bookmark | ||
register: test_book | ||
data: | ||
name: "{{ book_name }}" | ||
public: True | ||
query: last_report | ||
controller: job_invocations | ||
|
||
# Update | ||
- action: update | ||
register: test_book | ||
model: Bookmark | ||
data: | ||
query: "{{ book_query }}" | ||
search_query: | ||
name: "{{ book_name }}" | ||
|
||
# Assert | ||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_book.query | ||
- "{{ book_query }}" | ||
|
||
# Delete | ||
- action: delete | ||
model: Bookmark | ||
search_query: | ||
name: "{{ book_name }}" |
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,37 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
param_name: parameter | ||
value: test_value | ||
new_value: 100 | ||
|
||
actions: | ||
|
||
# Create | ||
- model: CommonParameter | ||
register: test_comm_param | ||
data: | ||
name: "{{ param_name }}" | ||
value: "{{ value }}" | ||
|
||
# Update | ||
- action: update | ||
register: test_comm_param | ||
model: CommonParameter | ||
data: | ||
value: "{{ new_value }}" | ||
search_query: | ||
name: "{{ param_name }}" | ||
|
||
# Assert | ||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_comm_param.value | ||
- "{{ new_value }}" | ||
|
||
# Delete | ||
- action: delete | ||
model: CommonParameter | ||
search_query: | ||
name: "{{ param_name }}" |
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,36 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
name: config_grp | ||
new_name: config_grp2 | ||
|
||
actions: | ||
|
||
# Create | ||
- model: ConfigGroup | ||
register: test_group | ||
data: | ||
name: "{{ name }}" | ||
|
||
# Update | ||
- action: update | ||
register: test_group | ||
model: ConfigGroup | ||
data: | ||
name: "{{ new_name }}" | ||
search_query: | ||
name: "{{ name }}" | ||
|
||
# Assert | ||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_group.name | ||
- "{{ new_name }}" | ||
|
||
# Delete | ||
# No attribute delete | ||
# - action: delete | ||
# model: ConfigGroup | ||
# search_query: | ||
# name: "{{ new_name }}" |
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,43 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
name: config_temp | ||
comment: auditing | ||
new_comment: audit done | ||
|
||
actions: | ||
|
||
# Create | ||
- model: ConfigTemplate | ||
register: test_cfg_tmp | ||
data: | ||
name: "{{ name }}" | ||
audit_comment: "{{ comment }}" | ||
snippet: 'true' | ||
template: temp | ||
template_combinations: | ||
- 1 | ||
- 2 | ||
- 3 | ||
|
||
# Update | ||
- action: update | ||
register: test_cfg_tmp | ||
model: ConfigTemplate | ||
data: | ||
audit_comment: "{{ new_comment }}" | ||
search_query: | ||
name: "{{ name }}" | ||
|
||
# Assert | ||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_cfg_tmp.audit_comment | ||
- audit done | ||
|
||
# Delete | ||
- action: delete | ||
model: ConfigTemplate | ||
search_query: | ||
name: "{{ name }}" |
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,37 @@ | ||
# Testing nailgun entities | ||
|
||
vars: | ||
name: test content view | ||
composite_name: composite content view | ||
|
||
actions: | ||
|
||
- model: ContentView | ||
register: test_view | ||
data: | ||
name: "{{ name }}" | ||
composite: False | ||
description: satellite-populate content view test | ||
label: test | ||
next_version: 2 | ||
content_host_count: 0 | ||
last_published: 07/28/2017 | ||
|
||
- action: update | ||
register: test_view | ||
model: ContentView | ||
data: | ||
composite: True | ||
search_query: | ||
name: "{{ name }}" | ||
|
||
- action: assertion | ||
operation: eq | ||
data: | ||
- from_registry: test_view.composite | ||
- True | ||
|
||
- action: delete | ||
model: ContentView | ||
search_query: | ||
name: "{{ name }}" |
Oops, something went wrong.