-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6775 from inverse-inc/feature/venom-1.0.0
Feature/venom 1.0.0
- Loading branch information
Showing
149 changed files
with
759 additions
and
244 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
addons/vagrant/inventory/group_vars/localdev/packetfence_install.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
venom__version: 'v1.0.0-rc.7' | ||
venom__version: 'v1.0.1' | ||
|
||
venom_dir: '/usr/local/pf/t/venom' |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
venom__version: 'v1.0.0-rc.7' | ||
venom__version: 'v1.0.1' | ||
|
||
venom_dir: '/usr/local/pf/t/venom' | ||
|
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
- inverse_inc.utils | ||
|
||
vars: | ||
venom__version: 'v1.0.0-rc.7' | ||
venom__version: 'v1.0.1' | ||
|
||
roles: | ||
- role: venom | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
executor: check_host_internet_access | ||
# By default it will use the node1 | ||
input: | ||
host: "{{.node01_mgmt_ip}}" | ||
user: "{{.ssh_user}}" | ||
steps: | ||
- type: ssh | ||
host: '{{.input.host}}' | ||
user: '{{.input.user}}' | ||
command: | | ||
cd '{{.venom_dir}}' ; \ | ||
sudo '{{.venom_dir}}/venom-wrapper.sh' '{{.test_suites_dir}}/common/check_internet_access.yml' |
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,12 @@ | ||
executor: check_internet_access | ||
input: | ||
url: '{{.network_detection_url}}' | ||
steps: | ||
- type: http | ||
method: GET | ||
url: '{{.input.url}}' | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
# retry to let node get IP by DHCP | ||
retry: 6 | ||
delay: 10 |
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,15 @@ | ||
executor: customA | ||
input: | ||
myArg: "world2" | ||
steps: | ||
- type: customB | ||
myWord: "{{.input.myArg}}" | ||
vars: | ||
content: | ||
from: result.foobarb | ||
- script: echo "hello {{.content}}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring "{{.input.myArg}}" | ||
output: | ||
foobarA: "{{.result.systemout}}" |
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,10 @@ | ||
executor: customB | ||
input: | ||
myWord: "world" | ||
steps: | ||
- script: echo "{{.input.myWord}}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring "{{.input.myWord}}" | ||
output: | ||
foobarB: "{{.result.systemout}}" |
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,14 @@ | ||
executor: customC | ||
input: | ||
myarg: { | ||
"name": "default", | ||
"surname": "default2" | ||
} | ||
steps: | ||
- script: echo "{{.input.myarg.name}}" > t.log | ||
- script: echo "{\"hello\":\"{{.input.myarg.name}} and {{.input.myarg.surname}}\"}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
output: | ||
systemout: "{{.result.systemout}}" | ||
systemoutjson.hello: "{{.result.systemoutjson.hello}}" |
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,12 @@ | ||
executor: customD | ||
input: | ||
myArg: "world2" | ||
steps: | ||
- type: customB | ||
myWord: "{{.input.myArg}}" | ||
- script: echo "hello {{.result.foobarb}}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring "{{.input.myArg}}" | ||
output: | ||
foobard: "{{.result.systemout}}" |
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,20 @@ | ||
executor: customE | ||
input: | ||
myArg: "world2" | ||
steps: | ||
- type: customB | ||
myWord: "{{.input.myArg}}" | ||
vars: | ||
varCustomB: | ||
from: result.foobarb | ||
- script: echo "hello {{.varCustomB}}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring "{{.input.myArg}}" | ||
- script: echo "hello you {{.varCustomB}}" | ||
assertions: | ||
- result.code ShouldEqual 0 | ||
- result.systemout ShouldContainSubstring "{{.input.myArg}}" | ||
output: | ||
foobarb: "{{.varcustomb}}" | ||
foobare: "{{.result.systemout}}" |
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,11 @@ | ||
executor: foobarcustommultisteps | ||
input: {} | ||
steps: | ||
- script: echo "hello" | ||
vars: | ||
content: | ||
from: result.systemout | ||
- script: echo "{{.content}} world" | ||
output: | ||
foobar: "{{.result.systemout}}" | ||
contento: "{{.content}}" |
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,7 @@ | ||
executor: haproxy-admin_restart | ||
input: | ||
myarg: {} | ||
steps: | ||
# service restarted by hand because using API cause Venom failure (EOF) | ||
- type: restart_systemctl_service | ||
service: packetfence-haproxy-admin |
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,19 @@ | ||
executor: haproxy-admini_restart_api | ||
input: | ||
myArg: {} | ||
# service restarted by hand because using API cause Venom failure (EOF) | ||
steps: | ||
- type: get_login_token | ||
|
||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/service/haproxy-admin/restart' | ||
ignore_verify_ssl: true | ||
headers: | ||
"Authorization": "{{.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,33 @@ | ||
executor: delete_node | ||
input: | ||
mac_address: {} | ||
mac_address_url_encoded: {} | ||
steps: | ||
# Get token | ||
- type: get_login_token | ||
vars: | ||
token: | ||
from: result.token | ||
# delete_node | ||
- type: http | ||
method: DELETE | ||
url: '{{.pfserver_webadmin_url}}/api/v1/node/{{.input.mac_address_url_encoded}}' | ||
ignore_verify_ssl: true | ||
headers: | ||
"Authorization": "{{.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
- result.bodyjson.message ShouldEqual "Deleted {{.input.mac_address}} successfully" | ||
|
||
# check node deleted | ||
- type: http | ||
method: GET | ||
url: '{{.pfserver_webadmin_url}}/api/v1/node/{{.input.mac_address_url_encoded}}' | ||
ignore_verify_ssl: true | ||
headers: | ||
"Authorization": "{{.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 404 | ||
- result.bodyjson.message ShouldEqual "Unable to get resource with this identifier" |
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,5 @@ | ||
executor: enable_node_cleanup | ||
|
||
steps: | ||
- type: node_task_cleanup | ||
status: "disable" |
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,5 @@ | ||
executor: enable_node_cleanup | ||
|
||
steps: | ||
- type: node_task_cleanup | ||
status: "enable" |
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,42 @@ | ||
executor: node_task_cleanup | ||
input: | ||
status: "enabled" | ||
interval: "{{.node_cleanup.delete_window.interval}}" | ||
unit: "{{.node_cleanup.delete_window.unit}}" | ||
|
||
steps: | ||
- type: get_login_token | ||
vars: | ||
token: | ||
from: result.token | ||
|
||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/maintenance_task/node_cleanup' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"status": "{{.input.status}}" | ||
} | ||
headers: | ||
"Authorization": "{{.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
|
||
- type: http | ||
method: PATCH | ||
url: '{{.pfserver_webadmin_url}}/api/v1/config/maintenance_task/node_cleanup' | ||
ignore_verify_ssl: true | ||
body: >- | ||
{ | ||
"delete_window": { | ||
"interval": "{{.input.interval}}", | ||
"unit": "{{.input.unit}}" | ||
} | ||
} | ||
headers: | ||
"Authorization": "{{.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 |
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,21 @@ | ||
executor: pf_api_service_action | ||
input: | ||
service: {} | ||
action: {} | ||
steps: | ||
- type: get_login_token | ||
|
||
- type: http | ||
method: POST | ||
url: '{{.pfserver_webadmin_url}}/api/v1/service/{{.input.service}}/{{.input.action}}' | ||
ignore_verify_ssl: true | ||
headers: | ||
"Authorization": "{{.result.token}}" | ||
"Content-Type": "application/json" | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
output: | ||
postjson: "{{.result.bodyjson}}" | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,10 @@ | ||
executor: pf_api_service_disable | ||
input: | ||
service: {} | ||
steps: | ||
- type: pf_api_service_action | ||
service: "{{.input.service}}" | ||
action: "disable" | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,10 @@ | ||
executor: pf_api_service_enable | ||
input: | ||
service: {} | ||
steps: | ||
- type: pf_api_service_action | ||
service: "{{.input.service}}" | ||
action: "enable" | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,10 @@ | ||
executor: pf_api_service_restart | ||
input: | ||
service: {} | ||
steps: | ||
- type: pf_api_service_action | ||
service: "{{.input.service}}" | ||
action: "restart" | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,10 @@ | ||
executor: pf_api_service_start | ||
input: | ||
service: {} | ||
steps: | ||
- type: pf_api_service_action | ||
service: "{{.input.service}}" | ||
action: "start" | ||
|
||
- type: sleep | ||
time_to_sleep: 5 |
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,9 @@ | ||
executor: pf_api_service_status | ||
input: | ||
service: {} | ||
steps: | ||
- type: pf_api_service_action | ||
service: "{{.input.service}}" | ||
action: "status" | ||
output: | ||
postjson: "{{.result.postjson}}" |
Oops, something went wrong.