-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #187: Mock external APIs, softwares and e-mails
* Mock PeeringDB API GET requests * Mock bgpq3 subprocess call * Python 3.8 being released test the code against it * Mock NetBox API responses * Test PeeringDB database synchronization * Fix e-mail sending form * Test e-mail form and view * Test template views
- Loading branch information
Showing
32 changed files
with
1,125 additions
and
107 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 was deleted.
Oops, something went wrong.
Empty file.
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,89 @@ | ||
{ | ||
"id": 1, | ||
"name": "router01.example.net", | ||
"display_name": "router01.example.net", | ||
"device_type": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/dcim/device-types/1/", | ||
"manufacturer": { | ||
"id": 5, | ||
"url": "http://netbox.example.net/api/dcim/manufacturers/5/", | ||
"name": "Juniper", | ||
"slug": "juniper" | ||
}, | ||
"model": "SRX300", | ||
"slug": "srx300", | ||
"display_name": "Juniper SRX300" | ||
}, | ||
"device_role": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/dcim/device-roles/7/", | ||
"name": "Router", | ||
"slug": "router" | ||
}, | ||
"tenant": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/tenancy/tenants/1/", | ||
"name": "example.net", | ||
"slug": "example-net" | ||
}, | ||
"platform": { | ||
"id": 3, | ||
"url": "http://netbox.example.net/api/dcim/platforms/3/", | ||
"name": "Juniper Junos", | ||
"slug": "juniper-junos" | ||
}, | ||
"serial": "CV3216AF0132", | ||
"asset_tag": null, | ||
"site": { | ||
"id": 4, | ||
"url": "http://netbox.example.net/api/dcim/sites/4/", | ||
"name": "Metz", | ||
"slug": "metz" | ||
}, | ||
"rack": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/dcim/racks/1/", | ||
"name": "RACK-001", | ||
"display_name": "RACK-001" | ||
}, | ||
"position": 9, | ||
"face": { | ||
"value": 0, | ||
"label": "Front" | ||
}, | ||
"parent_device": null, | ||
"status": { | ||
"value": 1, | ||
"label": "Active" | ||
}, | ||
"primary_ip": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/7/", | ||
"family": 6, | ||
"address": "2001:678:794::2/128" | ||
}, | ||
"primary_ip4": { | ||
"id": 265, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/265/", | ||
"family": 4, | ||
"address": "45.154.62.2/32" | ||
}, | ||
"primary_ip6": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/7/", | ||
"family": 6, | ||
"address": "2001:db8::2/128" | ||
}, | ||
"cluster": null, | ||
"virtual_chassis": null, | ||
"vc_position": null, | ||
"vc_priority": null, | ||
"comments": "", | ||
"local_context_data": null, | ||
"tags": [], | ||
"custom_fields": {}, | ||
"config_context": {}, | ||
"created": "2016-12-16", | ||
"last_updated": "2019-11-01T16:25:55.481312+01:00" | ||
} |
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 @@ | ||
{ | ||
"vendor": "Juniper", | ||
"model": "SRX300", | ||
"serial_number": "CV3216AF0132", | ||
"os_version": "15.1X49-D170.4", | ||
"hostname": "router01", | ||
"fqdn": "router01.example.net", | ||
"uptime": 4082036, | ||
"interface_list": [ | ||
"ge-0/0/0", | ||
"gr-0/0/0", | ||
"ip-0/0/0", | ||
"lsq-0/0/0", | ||
"lt-0/0/0", | ||
"mt-0/0/0", | ||
"sp-0/0/0", | ||
"ge-0/0/1", | ||
"ge-0/0/2", | ||
"ge-0/0/3", | ||
"ge-0/0/4", | ||
"ge-0/0/5", | ||
"ge-0/0/6", | ||
"ge-0/0/7", | ||
"ae0", | ||
"gre", | ||
"ipip", | ||
"irb", | ||
"jsrv", | ||
"lo0", | ||
"lsi", | ||
"mtun", | ||
"pimd", | ||
"pime", | ||
"pp0", | ||
"ppd0", | ||
"ppe0", | ||
"st0", | ||
"tap", | ||
"vlan", | ||
"vtep" | ||
] | ||
} |
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,185 @@ | ||
{ | ||
"count": 2, | ||
"next": null, | ||
"previous": null, | ||
"results": [ | ||
{ | ||
"id": 1, | ||
"name": "router01.example.net", | ||
"display_name": "router01.example.net", | ||
"device_type": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/dcim/device-types/1/", | ||
"manufacturer": { | ||
"id": 5, | ||
"url": "http://netbox.example.net/api/dcim/manufacturers/5/", | ||
"name": "Juniper", | ||
"slug": "juniper" | ||
}, | ||
"model": "SRX300", | ||
"slug": "srx300", | ||
"display_name": "Juniper SRX300" | ||
}, | ||
"device_role": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/dcim/device-roles/7/", | ||
"name": "Router", | ||
"slug": "router" | ||
}, | ||
"tenant": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/tenancy/tenants/1/", | ||
"name": "example.net", | ||
"slug": "example-net" | ||
}, | ||
"platform": { | ||
"id": 3, | ||
"url": "http://netbox.example.net/api/dcim/platforms/3/", | ||
"name": "Juniper Junos", | ||
"slug": "juniper-junos" | ||
}, | ||
"serial": "CV3216AF0132", | ||
"asset_tag": null, | ||
"site": { | ||
"id": 4, | ||
"url": "http://netbox.example.net/api/dcim/sites/4/", | ||
"name": "Metz", | ||
"slug": "metz" | ||
}, | ||
"rack": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/dcim/racks/1/", | ||
"name": "RACK-001", | ||
"display_name": "RACK-001" | ||
}, | ||
"position": 9, | ||
"face": { | ||
"value": 0, | ||
"label": "Front" | ||
}, | ||
"parent_device": null, | ||
"status": { | ||
"value": 1, | ||
"label": "Active" | ||
}, | ||
"primary_ip": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/7/", | ||
"family": 6, | ||
"address": "2001:678:794::2/128" | ||
}, | ||
"primary_ip4": { | ||
"id": 265, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/265/", | ||
"family": 4, | ||
"address": "45.154.62.2/32" | ||
}, | ||
"primary_ip6": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/7/", | ||
"family": 6, | ||
"address": "2001:db8::2/128" | ||
}, | ||
"cluster": null, | ||
"virtual_chassis": null, | ||
"vc_position": null, | ||
"vc_priority": null, | ||
"comments": "", | ||
"local_context_data": null, | ||
"tags": [], | ||
"custom_fields": {}, | ||
"config_context": {}, | ||
"created": "2016-12-16", | ||
"last_updated": "2019-11-01T16:25:55.481312+01:00" | ||
}, | ||
{ | ||
"id": 14, | ||
"name": "router02.example.net", | ||
"display_name": "router02.example.net", | ||
"device_type": { | ||
"id": 18, | ||
"url": "http://netbox.example.net/api/dcim/device-types/18/", | ||
"manufacturer": { | ||
"id": 5, | ||
"url": "http://netbox.example.net/api/dcim/manufacturers/5/", | ||
"name": "Juniper", | ||
"slug": "juniper" | ||
}, | ||
"model": "SRX320", | ||
"slug": "srx320", | ||
"display_name": "Juniper SRX320" | ||
}, | ||
"device_role": { | ||
"id": 7, | ||
"url": "http://netbox.example.net/api/dcim/device-roles/7/", | ||
"name": "Router", | ||
"slug": "router" | ||
}, | ||
"tenant": { | ||
"id": 1, | ||
"url": "http://netbox.example.net/api/tenancy/tenants/1/", | ||
"name": "example.net", | ||
"slug": "example-net" | ||
}, | ||
"platform": { | ||
"id": 3, | ||
"url": "http://netbox.example.net/api/dcim/platforms/3/", | ||
"name": "Juniper Junos", | ||
"slug": "juniper-junos" | ||
}, | ||
"serial": "CW2516AF0387", | ||
"asset_tag": null, | ||
"site": { | ||
"id": 3, | ||
"url": "http://netbox.example.net/api/dcim/sites/3/", | ||
"name": "Bettembourg", | ||
"slug": "bettembourg" | ||
}, | ||
"rack": { | ||
"id": 3, | ||
"url": "http://netbox.example.net/api/dcim/racks/3/", | ||
"name": "RACK-002", | ||
"display_name": "RACK-002" | ||
}, | ||
"position": 13, | ||
"face": { | ||
"value": 0, | ||
"label": "Front" | ||
}, | ||
"parent_device": null, | ||
"status": { | ||
"value": 1, | ||
"label": "Active" | ||
}, | ||
"primary_ip": { | ||
"id": 178, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/178/", | ||
"family": 6, | ||
"address": "2001:678:794::1/128" | ||
}, | ||
"primary_ip4": { | ||
"id": 270, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/270/", | ||
"family": 4, | ||
"address": "45.154.62.1/32" | ||
}, | ||
"primary_ip6": { | ||
"id": 178, | ||
"url": "http://netbox.example.net/api/ipam/ip-addresses/178/", | ||
"family": 6, | ||
"address": "2001:db8::1/128" | ||
}, | ||
"cluster": null, | ||
"virtual_chassis": null, | ||
"vc_position": null, | ||
"vc_priority": null, | ||
"comments": "", | ||
"local_context_data": null, | ||
"tags": [], | ||
"custom_fields": {}, | ||
"config_context": {}, | ||
"created": "2018-07-18", | ||
"last_updated": "2019-11-01T16:26:45.768360+01:00" | ||
} | ||
] | ||
} |
Oops, something went wrong.