F5 Programmability Training > Class 2: Building Continuous Delivery Pipelines > Module 3: Stitching Workflows from Class 1 into new Orchestratable Collections Source | Edit on
Lab 3.4 - Execute an f5-newman-wrapper for Teardown¶
To get ready for the next module, we’re going to execute one last f5-newman-wrapper
directly. This file will delete the framework and service we created in the
last few labs. We’ve used a few f5-newman-wrapper files to create our service,
and show some mutation, but for the deletion we will only use 1. As AS3 is
declaration engine is a single call can be used to create a service and a
single call can be used to remove it.
Task 1 - Execute f5-newman-build-5¶
Navigate to the location containing the f5-newman-wrapper files
cd /home/snops/f5-automation-labs/jenkins/f5-newman-buildOn BIG-IP A examine the virtual server
module_3_vs, it should be active and Green:On BIGIP-A examine the pool
module_3_pool, you should show 3 active members Green:f5-newman-build-5contains the call to delete all items we’ve created in the last few modulesExecute:
f5-newman-wrapper f5-newman-build-5Output should look like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
[root@f5-super-netops] [/home/snops/f5-automation-labs/jenkins/f5-newman-build] # f5-newman-wrapper f5-newman-build-5 [f5-newman-build-5-2018-07-30-08-06-14] starting run [f5-newman-build-5-2018-07-30-08-06-14] [runCollection][Authenticate to BIG-IP] running... newman BIGIP_API_Authentication ❏ 1_Authenticate ↳ Authenticate and Obtain Token POST https://10.1.1.10/mgmt/shared/authn/login [200 OK, 1.62KB, 367ms] ✓ [POST Response Code]=200 ✓ [Populate Variable] bigip_token=5EKXOKALEB2E7TALKKANCK6GUD ↳ Verify Authentication Works GET https://10.1.1.10/mgmt/shared/authz/tokens/5EKXOKALEB2E7TALKKANCK6GUD [200 OK, 1.44KB, 24ms] ✓ [GET Response Code]=200 ✓ [Current Value] token=5EKXOKALEB2E7TALKKANCK6GUD ✓ [Check Value] token == 5EKXOKALEB2E7TALKKANCK6GUD ↳ Set Authentication Token Timeout PATCH https://10.1.1.10/mgmt/shared/authz/tokens/5EKXOKALEB2E7TALKKANCK6GUD [200 OK, 1.44KB, 83ms] ✓ [PATCH Response Code]=200 ✓ [Current Value] timeout=1200 ✓ [Check Value] timeout == 1200 ┌─────────────────────────┬──────────┬──────────┐ │ │ executed │ failed │ ├─────────────────────────┼──────────┼──────────┤ │ iterations │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ requests │ 3 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ test-scripts │ 3 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ prerequest-scripts │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ assertions │ 8 │ 0 │ ├─────────────────────────┴──────────┴──────────┤ │ total run duration: 1062ms │ ├───────────────────────────────────────────────┤ │ total data received: 1.72KB (approx) │ ├───────────────────────────────────────────────┤ │ average response time: 158ms │ └───────────────────────────────────────────────┘ [f5-newman-build-5-2018-07-30-08-06-14] [runCollection][5 - Clean Up Service] running... newman f5-programmability-class-2 ❏ 5 - Clean Up Service ↳ Step 1: Delete HTTP Application DELETE https://10.1.1.10/mgmt/shared/appsvcs/declare/ [200 OK, 1.2KB, 12s] ✓ [DELETE Response Code]=200 ✓ [Current Value] results.0.message=success ✓ [Check Value] results.0.message regex /success|no change/ ┌─────────────────────────┬──────────┬──────────┐ │ │ executed │ failed │ ├─────────────────────────┼──────────┼──────────┤ │ iterations │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ requests │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ test-scripts │ 2 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ prerequest-scripts │ 1 │ 0 │ ├─────────────────────────┼──────────┼──────────┤ │ assertions │ 3 │ 0 │ ├─────────────────────────┴──────────┴──────────┤ │ total run duration: 12.3s │ ├───────────────────────────────────────────────┤ │ total data received: 273B (approx) │ ├───────────────────────────────────────────────┤ │ average response time: 12s │ └───────────────────────────────────────────────┘ [f5-newman-build-5-2018-07-30-08-06-14] run completed
Note
Notice the 200 OK responses, as it completed successfully
On BIG-IP A the Partition, Virtual
module_3_vsand Poolmodule_3_poolare deleted

