|  | 
| 4 | 4 | ### NETBOX_CIRCUIT_TERMINATION | 
| 5 | 5 | ## | 
| 6 | 6 | ## | 
|  | 7 | +- name: "NETBOX_CIRCUIT_TERMINATION 0: Create provider network within NetBox with only required information" | 
|  | 8 | +  netbox.netbox.netbox_provider_network: | 
|  | 9 | +    netbox_url: http://localhost:32768 | 
|  | 10 | +    netbox_token: "0123456789abcdef0123456789abcdef01234567" | 
|  | 11 | +    data: | 
|  | 12 | +      provider: Test Provider | 
|  | 13 | +      name: Test Provider Network One | 
|  | 14 | +    state: present | 
|  | 15 | +  register: test_one | 
|  | 16 | + | 
|  | 17 | +- name: "NETBOX_CIRCUIT_TERMINATION 0: ASSERT - Necessary info creation" | 
|  | 18 | +  ansible.builtin.assert: | 
|  | 19 | +    that: | 
|  | 20 | +      - test_one is changed | 
|  | 21 | +      - test_one['diff']['before']['state'] == "absent" | 
|  | 22 | +      - test_one['diff']['after']['state'] == "present" | 
|  | 23 | +      - test_one['provider_network']['name'] == "Test Provider Network One" | 
|  | 24 | +      - test_one['msg'] == "provider_network Test Provider Network One created" | 
|  | 25 | + | 
| 7 | 26 | - name: "NETBOX_CIRCUIT_TERMINATION 1: Create provider within NetBox with only required information" | 
| 8 | 27 |   netbox.netbox.netbox_circuit_termination: | 
| 9 | 28 |     netbox_url: http://localhost:32768 | 
| 10 | 29 |     netbox_token: "0123456789abcdef0123456789abcdef01234567" | 
| 11 | 30 |     data: | 
| 12 | 31 |       circuit: Test Circuit | 
| 13 | 32 |       term_side: A | 
| 14 |  | -      site: Test Site | 
|  | 33 | +      termination_id: 2 | 
|  | 34 | +      termination_type: circuits.providernetwork | 
| 15 | 35 |       port_speed: 10000 | 
| 16 | 36 |     state: present | 
| 17 | 37 |   register: test_one | 
|  | 
| 22 | 42 |       - test_one is changed | 
| 23 | 43 |       - test_one['diff']['before']['state'] == "absent" | 
| 24 | 44 |       - test_one['diff']['after']['state'] == "present" | 
|  | 45 | +      - test_one['circuit_termination']['termination_type'] == "circuits.providernetwork" | 
|  | 46 | +      - test_one['circuit_termination']['termination_id'] == 2 | 
| 25 | 47 |       - test_one['circuit_termination']['circuit'] == 1 | 
| 26 | 48 |       - test_one['circuit_termination']['term_side'] == "A" | 
| 27 |  | -      - test_one['circuit_termination']['site'] == 1 | 
| 28 | 49 |       - test_one['circuit_termination']['port_speed'] == 10000 | 
| 29 | 50 |       - test_one['msg'] == "circuit_termination test_circuit_a created" | 
| 30 | 51 | 
 | 
|  | 
| 44 | 65 |       - not test_two['changed'] | 
| 45 | 66 |       - test_two['circuit_termination']['circuit'] == 1 | 
| 46 | 67 |       - test_two['circuit_termination']['term_side'] == "A" | 
| 47 |  | -      - test_two['circuit_termination']['site'] == 1 | 
| 48 | 68 |       - test_two['circuit_termination']['port_speed'] == 10000 | 
| 49 | 69 |       - test_two['msg'] == "circuit_termination test_circuit_a already exists" | 
| 50 | 70 | 
 | 
|  | 
| 72 | 92 |       - test_three['diff']['after']['description'] == "Test description" | 
| 73 | 93 |       - test_three['circuit_termination']['circuit'] == 1 | 
| 74 | 94 |       - test_three['circuit_termination']['term_side'] == "A" | 
| 75 |  | -      - test_three['circuit_termination']['site'] == 1 | 
| 76 | 95 |       - test_three['circuit_termination']['port_speed'] == 10000 | 
| 77 | 96 |       - test_three['circuit_termination']['upstream_speed'] == 1000 | 
| 78 | 97 |       - test_three['circuit_termination']['xconnect_id'] == "10X100" | 
|  | 
| 87 | 106 |     data: | 
| 88 | 107 |       circuit: Test Circuit | 
| 89 | 108 |       term_side: Z | 
| 90 |  | -      site: Test Site | 
|  | 109 | +      termination_id: 2 | 
|  | 110 | +      termination_type: circuits.providernetwork | 
| 91 | 111 |       port_speed: 10000 | 
| 92 | 112 |     state: present | 
| 93 | 113 |   register: test_four | 
|  | 
| 98 | 118 |       - test_four is changed | 
| 99 | 119 |       - test_four['diff']['before']['state'] == "absent" | 
| 100 | 120 |       - test_four['diff']['after']['state'] == "present" | 
|  | 121 | +      - test_one['circuit_termination']['termination_type'] == "circuits.providernetwork" | 
|  | 122 | +      - test_one['circuit_termination']['termination_id'] == 2 | 
| 101 | 123 |       - test_four['circuit_termination']['circuit'] == 1 | 
| 102 | 124 |       - test_four['circuit_termination']['term_side'] == "Z" | 
| 103 |  | -      - test_four['circuit_termination']['site'] == 1 | 
| 104 | 125 |       - test_four['circuit_termination']['port_speed'] == 10000 | 
| 105 | 126 |       - test_four['msg'] == "circuit_termination test_circuit_z created" | 
| 106 | 127 | 
 | 
|  | 
| 120 | 141 |       - test_five is changed | 
| 121 | 142 |       - test_five['circuit_termination']['circuit'] == 1 | 
| 122 | 143 |       - test_five['circuit_termination']['term_side'] == "A" | 
| 123 |  | -      - test_five['circuit_termination']['site'] == 1 | 
| 124 | 144 |       - test_five['circuit_termination']['port_speed'] == 10000 | 
| 125 | 145 |       - test_five['circuit_termination']['upstream_speed'] == 1000 | 
| 126 | 146 |       - test_five['circuit_termination']['xconnect_id'] == "10X100" | 
| 127 | 147 |       - test_five['circuit_termination']['pp_info'] == "PP10-24" | 
| 128 | 148 |       - test_five['circuit_termination']['description'] == "Test description" | 
|  | 149 | +      - test_one['circuit_termination']['termination_type'] == "circuits.providernetwork" | 
|  | 150 | +      - test_one['circuit_termination']['termination_id'] == 2 | 
| 129 | 151 |       - test_five['msg'] == "circuit_termination test_circuit_a deleted" | 
0 commit comments