foreman_netbox 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +619 -0
- data/README.md +50 -0
- data/Rakefile +50 -0
- data/app/contracts/foreman_netbox/device_contract.rb +42 -0
- data/app/contracts/foreman_netbox/params/interface_params.rb +16 -0
- data/app/contracts/foreman_netbox/params/ip_address_params.rb +15 -0
- data/app/contracts/foreman_netbox/params/tenant_params.rb +13 -0
- data/app/contracts/foreman_netbox/virtual_machine_contract.rb +29 -0
- data/app/interactors/foreman_netbox/concerns/facts.rb +11 -0
- data/app/interactors/foreman_netbox/concerns/primary_ips.rb +25 -0
- data/app/interactors/foreman_netbox/delete_host/delete_device.rb +20 -0
- data/app/interactors/foreman_netbox/delete_host/delete_virtual_machine.rb +20 -0
- data/app/interactors/foreman_netbox/delete_host/organizer.rb +12 -0
- data/app/interactors/foreman_netbox/sync_host/organizer.rb +35 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/create.rb +36 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/find.rb +41 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/organizer.rb +30 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/save_netbox_url.rb +29 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/create.rb +32 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/find.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/organizer.rb +20 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/create.rb +34 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/find.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/organizer.rb +22 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/sync_manufacturer/create.rb +34 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/sync_manufacturer/find.rb +40 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/sync_manufacturer/organizer.rb +22 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/update.rb +33 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/create.rb +37 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/delete.rb +36 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/find.rb +30 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/organizer.rb +23 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/create.rb +46 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/delete.rb +40 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/find.rb +32 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/organizer.rb +24 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/update.rb +39 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/update.rb +38 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_site/create.rb +32 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_site/find.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_site/organizer.rb +25 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/sync_site/update.rb +35 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/update.rb +85 -0
- data/app/interactors/foreman_netbox/sync_host/sync_device/validate.rb +25 -0
- data/app/interactors/foreman_netbox/sync_host/sync_tenant/create.rb +30 -0
- data/app/interactors/foreman_netbox/sync_host/sync_tenant/find.rb +26 -0
- data/app/interactors/foreman_netbox/sync_host/sync_tenant/organizer.rb +19 -0
- data/app/interactors/foreman_netbox/sync_host/sync_tenant/update.rb +33 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/create.rb +34 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/find.rb +34 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/organizer.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/save_netbox_url.rb +31 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/create.rb +35 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/find.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/organizer.rb +22 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/sync_cluster_type/create.rb +34 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/sync_cluster_type/find.rb +32 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/sync_cluster_type/organizer.rb +22 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/update.rb +35 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/create.rb +33 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/delete.rb +36 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/find.rb +30 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/organizer.rb +23 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/create.rb +46 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/delete.rb +40 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/find.rb +28 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/organizer.rb +24 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/update.rb +39 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/update.rb +38 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/update.rb +82 -0
- data/app/interactors/foreman_netbox/sync_host/sync_virtual_machine/validate.rb +25 -0
- data/app/jobs/foreman_netbox/sync_host_job.rb +19 -0
- data/app/lib/foreman_netbox/api.rb +12 -0
- data/app/models/concerns/foreman_netbox/host_extensions.rb +27 -0
- data/app/models/concerns/foreman_netbox/location_extensions.rb +13 -0
- data/app/models/concerns/foreman_netbox/nic/base_extensions.rb +23 -0
- data/app/models/concerns/foreman_netbox/user_usergroup_common_extensions.rb +18 -0
- data/app/models/foreman_netbox/netbox_facet.rb +34 -0
- data/app/models/orchestration/netbox.rb +64 -0
- data/app/models/setting/netbox.rb +32 -0
- data/app/services/foreman_netbox/cached_netbox_parameters.rb +103 -0
- data/app/services/foreman_netbox/netbox_parameters.rb +185 -0
- data/app/services/foreman_netbox/netbox_parameters_comparator.rb +96 -0
- data/app/views/hosts/_netbox_tab.html.erb +28 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20200527135812_create_netbox_facet.rb +12 -0
- data/db/migrate/20200604141933_add_sync_info_to_netbox_facet.rb +8 -0
- data/db/migrate/20200708093607_add_raw_data_to_netbox_facet.rb +7 -0
- data/lib/foreman_netbox.rb +6 -0
- data/lib/foreman_netbox/engine.rb +64 -0
- data/lib/foreman_netbox/version.rb +5 -0
- data/lib/tasks/foreman_netbox_tasks.rake +67 -0
- data/test/factories/host.rb +17 -0
- data/test/factories/netbox_facet.rb +17 -0
- data/test/fixtures/facts/k8s_physical_host.json +328 -0
- data/test/fixtures/facts/rhel_physical_host.json +512 -0
- data/test/fixtures/facts/rhel_virtual_host.json +455 -0
- data/test/fixtures/netbox_device_raw_data.json +330 -0
- data/test/fixtures/netbox_virtual_machine_raw_data.json +241 -0
- data/test/integration/foreman_netbox/sync_k8s_physical_host_test.rb +81 -0
- data/test/integration/foreman_netbox/sync_rhel_physical_host_test.rb +81 -0
- data/test/integration/foreman_netbox/sync_rhel_virtual_host_test.rb +93 -0
- data/test/interactors/foreman_netbox/sync_host/organizer_test.rb +78 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/create_test.rb +65 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/find_test.rb +105 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/save_netbox_url_test.rb +39 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/create_test.rb +45 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/find_test.rb +58 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/create_test.rb +55 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/find_test.rb +63 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/sync_manufacturer/create_test.rb +48 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/sync_manufacturer/find_test.rb +105 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_device_type/update_test.rb +54 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/create_test.rb +51 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/delete_test.rb +41 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/find_test.rb +53 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/create_test.rb +80 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/delete_test.rb +72 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/find_test.rb +51 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/update_test.rb +64 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/update_test.rb +92 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_site/create_test.rb +51 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_site/find_test.rb +59 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/sync_site/update_test.rb +54 -0
- data/test/interactors/foreman_netbox/sync_host/sync_device/update_test.rb +188 -0
- data/test/interactors/foreman_netbox/sync_host/sync_tenant/create_test.rb +50 -0
- data/test/interactors/foreman_netbox/sync_host/sync_tenant/find_test.rb +58 -0
- data/test/interactors/foreman_netbox/sync_host/sync_tenant/update_test.rb +59 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/create_test.rb +74 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/find_test.rb +77 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/save_netbox_url_test.rb +39 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/create_test.rb +54 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/find_test.rb +58 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/sync_cluster_type/create_test.rb +50 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/sync_cluster_type/find_test.rb +65 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_cluster/update_test.rb +54 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/create_test.rb +53 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/delete_test.rb +37 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/find_test.rb +53 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/create_test.rb +80 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/delete_test.rb +73 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/find_test.rb +51 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/sync_ip_addresses/update_test.rb +64 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/sync_interfaces/update_test.rb +88 -0
- data/test/interactors/foreman_netbox/sync_host/sync_virtual_machine/update_test.rb +171 -0
- data/test/jobs/foreman_netbox/sync_host_job_test.rb +14 -0
- data/test/models/foreman_netbox/location_test.rb +42 -0
- data/test/models/foreman_netbox/netbox_facet_test.rb +219 -0
- data/test/models/foreman_netbox/nics/base_test.rb +81 -0
- data/test/models/foreman_netbox/usergroup_test.rb +23 -0
- data/test/models/host/managed_test.rb +63 -0
- data/test/services/foreman_netbox/netbox_attributes_test.rb +278 -0
- data/test/services/foreman_netbox/netbox_parameters_comparator_test.rb +136 -0
- data/test/test_plugin_helper.rb +25 -0
- metadata +343 -0
@@ -0,0 +1,330 @@
|
|
1
|
+
{
|
2
|
+
"tenant": {
|
3
|
+
"id": 94,
|
4
|
+
"name": "2d06a1b432912c9c0d03569ca-1001",
|
5
|
+
"slug": "2d06a1b432912c9c0d03569ca-1001",
|
6
|
+
"group": null,
|
7
|
+
"description": "",
|
8
|
+
"comments": "",
|
9
|
+
"tags": [
|
10
|
+
"foreman"
|
11
|
+
],
|
12
|
+
"custom_fields": {},
|
13
|
+
"created": "2020-07-14",
|
14
|
+
"last_updated": "2020-07-14T12:02:36.211132Z"
|
15
|
+
},
|
16
|
+
"site": {
|
17
|
+
"id": 3,
|
18
|
+
"name": "Location",
|
19
|
+
"slug": "location",
|
20
|
+
"status": {
|
21
|
+
"value": "active",
|
22
|
+
"label": "Active",
|
23
|
+
"id": 1
|
24
|
+
},
|
25
|
+
"region": null,
|
26
|
+
"tenant": null,
|
27
|
+
"facility": "",
|
28
|
+
"asn": null,
|
29
|
+
"time_zone": null,
|
30
|
+
"description": "",
|
31
|
+
"physical_address": "",
|
32
|
+
"shipping_address": "",
|
33
|
+
"latitude": null,
|
34
|
+
"longitude": null,
|
35
|
+
"contact_name": "",
|
36
|
+
"contact_phone": "",
|
37
|
+
"contact_email": "",
|
38
|
+
"comments": "",
|
39
|
+
"tags": [
|
40
|
+
"foreman"
|
41
|
+
],
|
42
|
+
"custom_fields": {},
|
43
|
+
"created": "2020-07-13",
|
44
|
+
"last_updated": "2020-07-13T14:11:51.321999Z",
|
45
|
+
"circuit_count": null,
|
46
|
+
"device_count": 2,
|
47
|
+
"prefix_count": null,
|
48
|
+
"rack_count": null,
|
49
|
+
"virtualmachine_count": null,
|
50
|
+
"vlan_count": null
|
51
|
+
},
|
52
|
+
"device_role": {
|
53
|
+
"id": 1,
|
54
|
+
"name": "SERVER",
|
55
|
+
"slug": "server",
|
56
|
+
"color": "9e9e9e",
|
57
|
+
"vm_role": true,
|
58
|
+
"description": "",
|
59
|
+
"device_count": 2,
|
60
|
+
"virtualmachine_count": null
|
61
|
+
},
|
62
|
+
"manufacturer": {
|
63
|
+
"id": 1,
|
64
|
+
"name": "HP",
|
65
|
+
"slug": "hp",
|
66
|
+
"description": "",
|
67
|
+
"devicetype_count": 1,
|
68
|
+
"inventoryitem_count": null,
|
69
|
+
"platform_count": null
|
70
|
+
},
|
71
|
+
"device_type": {
|
72
|
+
"id": 1,
|
73
|
+
"manufacturer": {
|
74
|
+
"id": 1,
|
75
|
+
"url": "http://0.0.0.0:8000/api/dcim/manufacturers/1.json",
|
76
|
+
"name": "HP",
|
77
|
+
"slug": "hp"
|
78
|
+
},
|
79
|
+
"model": "ProLiant DL380 Gen9",
|
80
|
+
"slug": "proliant-dl380-gen9",
|
81
|
+
"display_name": "HP ProLiant DL380 Gen9",
|
82
|
+
"part_number": "",
|
83
|
+
"u_height": 1,
|
84
|
+
"is_full_depth": true,
|
85
|
+
"subdevice_role": null,
|
86
|
+
"front_image": null,
|
87
|
+
"rear_image": null,
|
88
|
+
"comments": "",
|
89
|
+
"tags": [
|
90
|
+
"foreman"
|
91
|
+
],
|
92
|
+
"custom_fields": {},
|
93
|
+
"created": "2020-06-04",
|
94
|
+
"last_updated": "2020-06-04T11:25:20.915159Z",
|
95
|
+
"device_count": 1
|
96
|
+
},
|
97
|
+
"ip_addresses": {
|
98
|
+
"count": 2,
|
99
|
+
"next": null,
|
100
|
+
"previous": null,
|
101
|
+
"results": [
|
102
|
+
{
|
103
|
+
"id": 15,
|
104
|
+
"family": {
|
105
|
+
"value": 4,
|
106
|
+
"label": "IPv4"
|
107
|
+
},
|
108
|
+
"address": "10.0.0.8/24",
|
109
|
+
"vrf": null,
|
110
|
+
"tenant": null,
|
111
|
+
"status": {
|
112
|
+
"value": "active",
|
113
|
+
"label": "Active",
|
114
|
+
"id": 1
|
115
|
+
},
|
116
|
+
"role": null,
|
117
|
+
"interface": {
|
118
|
+
"id": 15,
|
119
|
+
"url": "http://0.0.0.0:8000/api/dcim/interfaces/15/",
|
120
|
+
"device": {
|
121
|
+
"id": 8,
|
122
|
+
"url": "http://0.0.0.0:8000/api/dcim/devices/8.json",
|
123
|
+
"name": "rhel_physical_host.tier.example.com",
|
124
|
+
"display_name": "rhel_physical_host.tier.example.com"
|
125
|
+
},
|
126
|
+
"virtual_machine": null,
|
127
|
+
"name": "eth0"
|
128
|
+
},
|
129
|
+
"nat_inside": null,
|
130
|
+
"nat_outside": null,
|
131
|
+
"dns_name": "",
|
132
|
+
"description": "",
|
133
|
+
"tags": [
|
134
|
+
"foreman"
|
135
|
+
],
|
136
|
+
"custom_fields": {},
|
137
|
+
"created": "2020-07-13",
|
138
|
+
"last_updated": "2020-07-13T14:58:07.111575Z"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"id": 16,
|
142
|
+
"family": {
|
143
|
+
"value": 6,
|
144
|
+
"label": "IPv6"
|
145
|
+
},
|
146
|
+
"address": "1600:0:2d0:202::18/64",
|
147
|
+
"vrf": null,
|
148
|
+
"tenant": null,
|
149
|
+
"status": {
|
150
|
+
"value": "active",
|
151
|
+
"label": "Active",
|
152
|
+
"id": 1
|
153
|
+
},
|
154
|
+
"role": null,
|
155
|
+
"interface": {
|
156
|
+
"id": 16,
|
157
|
+
"url": "http://0.0.0.0:8000/api/dcim/interfaces/16/",
|
158
|
+
"device": {
|
159
|
+
"id": 8,
|
160
|
+
"url": "http://0.0.0.0:8000/api/dcim/devices/8.json",
|
161
|
+
"name": "rhel_physical_host.tier.example.com",
|
162
|
+
"display_name": "rhel_physical_host.tier.example.com"
|
163
|
+
},
|
164
|
+
"virtual_machine": null,
|
165
|
+
"name": "eth1"
|
166
|
+
},
|
167
|
+
"nat_inside": null,
|
168
|
+
"nat_outside": null,
|
169
|
+
"dns_name": "",
|
170
|
+
"description": "",
|
171
|
+
"tags": [
|
172
|
+
"foreman"
|
173
|
+
],
|
174
|
+
"custom_fields": {},
|
175
|
+
"created": "2020-07-13",
|
176
|
+
"last_updated": "2020-07-13T14:58:07.220631Z"
|
177
|
+
}
|
178
|
+
]
|
179
|
+
},
|
180
|
+
"interfaces": {
|
181
|
+
"count": 2,
|
182
|
+
"next": null,
|
183
|
+
"previous": null,
|
184
|
+
"results": [
|
185
|
+
{
|
186
|
+
"id": 15,
|
187
|
+
"device": {
|
188
|
+
"id": 8,
|
189
|
+
"url": "http://0.0.0.0:8000/api/dcim/devices/8.json",
|
190
|
+
"name": "rhel_physical_host.tier.example.com",
|
191
|
+
"display_name": "rhel_physical_host.tier.example.com"
|
192
|
+
},
|
193
|
+
"name": "eth0",
|
194
|
+
"type": {
|
195
|
+
"value": "virtual",
|
196
|
+
"label": "Virtual",
|
197
|
+
"id": 0
|
198
|
+
},
|
199
|
+
"enabled": true,
|
200
|
+
"lag": null,
|
201
|
+
"mtu": null,
|
202
|
+
"mac_address": "C3:CD:63:54:21:61",
|
203
|
+
"mgmt_only": false,
|
204
|
+
"description": "",
|
205
|
+
"connected_endpoint_type": null,
|
206
|
+
"connected_endpoint": null,
|
207
|
+
"connection_status": null,
|
208
|
+
"cable": null,
|
209
|
+
"mode": null,
|
210
|
+
"untagged_vlan": null,
|
211
|
+
"tagged_vlans": [],
|
212
|
+
"tags": [
|
213
|
+
"foreman"
|
214
|
+
],
|
215
|
+
"count_ipaddresses": 1
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"id": 16,
|
219
|
+
"device": {
|
220
|
+
"id": 8,
|
221
|
+
"url": "http://0.0.0.0:8000/api/dcim/devices/8.json",
|
222
|
+
"name": "rhel_physical_host.tier.example.com",
|
223
|
+
"display_name": "rhel_physical_host.tier.example.com"
|
224
|
+
},
|
225
|
+
"name": "eth1",
|
226
|
+
"type": {
|
227
|
+
"value": "virtual",
|
228
|
+
"label": "Virtual",
|
229
|
+
"id": 0
|
230
|
+
},
|
231
|
+
"enabled": true,
|
232
|
+
"lag": null,
|
233
|
+
"mtu": null,
|
234
|
+
"mac_address": "45:E9:6A:83:02:21",
|
235
|
+
"mgmt_only": false,
|
236
|
+
"description": "",
|
237
|
+
"connected_endpoint_type": null,
|
238
|
+
"connected_endpoint": null,
|
239
|
+
"connection_status": null,
|
240
|
+
"cable": null,
|
241
|
+
"mode": null,
|
242
|
+
"untagged_vlan": null,
|
243
|
+
"tagged_vlans": [],
|
244
|
+
"tags": [
|
245
|
+
"foreman"
|
246
|
+
],
|
247
|
+
"count_ipaddresses": 1
|
248
|
+
}
|
249
|
+
]
|
250
|
+
},
|
251
|
+
"device": {
|
252
|
+
"id": 8,
|
253
|
+
"name": "rhel_physical_host.tier.example.com",
|
254
|
+
"display_name": "rhel_physical_host.tier.example.com",
|
255
|
+
"device_type": {
|
256
|
+
"id": 1,
|
257
|
+
"url": "http://0.0.0.0:8000/api/dcim/device-types/1.json",
|
258
|
+
"manufacturer": {
|
259
|
+
"id": 1,
|
260
|
+
"url": "http://0.0.0.0:8000/api/dcim/manufacturers/1.json",
|
261
|
+
"name": "HP",
|
262
|
+
"slug": "hp"
|
263
|
+
},
|
264
|
+
"model": "ProLiant DL380 Gen9",
|
265
|
+
"slug": "proliant-dl380-gen9",
|
266
|
+
"display_name": "HP ProLiant DL380 Gen9"
|
267
|
+
},
|
268
|
+
"device_role": {
|
269
|
+
"id": 1,
|
270
|
+
"url": "http://0.0.0.0:8000/api/dcim/device-roles/1.json",
|
271
|
+
"name": "SERVER",
|
272
|
+
"slug": "server"
|
273
|
+
},
|
274
|
+
"tenant": {
|
275
|
+
"id": 94,
|
276
|
+
"url": "http://0.0.0.0:8000/api/tenancy/tenants/94.json",
|
277
|
+
"name": "2d06a1b432912c9c0d03569ca-1001",
|
278
|
+
"slug": "2d06a1b432912c9c0d03569ca-1001"
|
279
|
+
},
|
280
|
+
"platform": null,
|
281
|
+
"serial": "ABCDEFGHI123",
|
282
|
+
"asset_tag": null,
|
283
|
+
"site": {
|
284
|
+
"id": 3,
|
285
|
+
"url": "http://0.0.0.0:8000/api/dcim/sites/3.json",
|
286
|
+
"name": "Location",
|
287
|
+
"slug": "location"
|
288
|
+
},
|
289
|
+
"rack": null,
|
290
|
+
"position": null,
|
291
|
+
"face": null,
|
292
|
+
"parent_device": null,
|
293
|
+
"status": {
|
294
|
+
"value": "active",
|
295
|
+
"label": "Active",
|
296
|
+
"id": 1
|
297
|
+
},
|
298
|
+
"primary_ip": {
|
299
|
+
"id": 16,
|
300
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/16.json",
|
301
|
+
"family": 6,
|
302
|
+
"address": "1600:0:2d0:202::18/64"
|
303
|
+
},
|
304
|
+
"primary_ip4": {
|
305
|
+
"id": 15,
|
306
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/15.json",
|
307
|
+
"family": 4,
|
308
|
+
"address": "10.0.0.8/24"
|
309
|
+
},
|
310
|
+
"primary_ip6": {
|
311
|
+
"id": 16,
|
312
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/16.json",
|
313
|
+
"family": 6,
|
314
|
+
"address": "1600:0:2d0:202::18/64"
|
315
|
+
},
|
316
|
+
"cluster": null,
|
317
|
+
"virtual_chassis": null,
|
318
|
+
"vc_position": null,
|
319
|
+
"vc_priority": null,
|
320
|
+
"comments": "",
|
321
|
+
"local_context_data": null,
|
322
|
+
"tags": [
|
323
|
+
"foreman"
|
324
|
+
],
|
325
|
+
"custom_fields": {},
|
326
|
+
"config_context": {},
|
327
|
+
"created": "2020-07-13",
|
328
|
+
"last_updated": "2020-07-14T12:02:37.622231Z"
|
329
|
+
}
|
330
|
+
}
|
@@ -0,0 +1,241 @@
|
|
1
|
+
{
|
2
|
+
"tenant": {
|
3
|
+
"id": 89,
|
4
|
+
"name": "Owner",
|
5
|
+
"slug": "owner",
|
6
|
+
"group": null,
|
7
|
+
"description": "",
|
8
|
+
"comments": "",
|
9
|
+
"tags": [
|
10
|
+
"foreman"
|
11
|
+
],
|
12
|
+
"custom_fields": {},
|
13
|
+
"created": "2020-07-13",
|
14
|
+
"last_updated": "2020-07-13T14:11:51.206250Z",
|
15
|
+
"circuit_count": null,
|
16
|
+
"device_count": 1,
|
17
|
+
"ipaddress_count": null,
|
18
|
+
"prefix_count": null,
|
19
|
+
"rack_count": null,
|
20
|
+
"site_count": null,
|
21
|
+
"virtualmachine_count": 1,
|
22
|
+
"vlan_count": null,
|
23
|
+
"vrf_count": null
|
24
|
+
},
|
25
|
+
"cluster_type": {
|
26
|
+
"id": 2,
|
27
|
+
"name": "VMware ESXi",
|
28
|
+
"slug": "vmware-esxi",
|
29
|
+
"description": "",
|
30
|
+
"cluster_count": 1
|
31
|
+
},
|
32
|
+
"cluster": {
|
33
|
+
"id": 2,
|
34
|
+
"name": "CLUSTER",
|
35
|
+
"type": {
|
36
|
+
"id": 2,
|
37
|
+
"url": "http://0.0.0.0:8000/api/virtualization/cluster-types/2.json",
|
38
|
+
"name": "VMware ESXi",
|
39
|
+
"slug": "vmware-esxi"
|
40
|
+
},
|
41
|
+
"group": null,
|
42
|
+
"tenant": null,
|
43
|
+
"site": null,
|
44
|
+
"comments": "",
|
45
|
+
"tags": [
|
46
|
+
"foreman"
|
47
|
+
],
|
48
|
+
"custom_fields": {},
|
49
|
+
"created": "2020-07-13",
|
50
|
+
"last_updated": "2020-07-13T14:11:55.974856Z",
|
51
|
+
"device_count": null,
|
52
|
+
"virtualmachine_count": 1
|
53
|
+
},
|
54
|
+
"ip_addresses": {
|
55
|
+
"count": 2,
|
56
|
+
"next": null,
|
57
|
+
"previous": null,
|
58
|
+
"results": [
|
59
|
+
{
|
60
|
+
"id": 17,
|
61
|
+
"family": {
|
62
|
+
"value": 4,
|
63
|
+
"label": "IPv4"
|
64
|
+
},
|
65
|
+
"address": "10.0.0.9/24",
|
66
|
+
"vrf": null,
|
67
|
+
"tenant": null,
|
68
|
+
"status": {
|
69
|
+
"value": "active",
|
70
|
+
"label": "Active",
|
71
|
+
"id": 1
|
72
|
+
},
|
73
|
+
"role": null,
|
74
|
+
"interface": {
|
75
|
+
"id": 17,
|
76
|
+
"url": "http://0.0.0.0:8000/api/virtualization/interfaces/17/",
|
77
|
+
"device": null,
|
78
|
+
"virtual_machine": {
|
79
|
+
"id": 3,
|
80
|
+
"url": "http://0.0.0.0:8000/api/virtualization/virtual-machines/3.json",
|
81
|
+
"name": "rhel_virtual_host.tier.example.com"
|
82
|
+
},
|
83
|
+
"name": "eth0"
|
84
|
+
},
|
85
|
+
"nat_inside": null,
|
86
|
+
"nat_outside": null,
|
87
|
+
"dns_name": "",
|
88
|
+
"description": "",
|
89
|
+
"tags": [
|
90
|
+
"foreman"
|
91
|
+
],
|
92
|
+
"custom_fields": {},
|
93
|
+
"created": "2020-07-13",
|
94
|
+
"last_updated": "2020-07-13T14:58:09.007393Z"
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"id": 18,
|
98
|
+
"family": {
|
99
|
+
"value": 6,
|
100
|
+
"label": "IPv6"
|
101
|
+
},
|
102
|
+
"address": "1600:0:2d0:202::19/64",
|
103
|
+
"vrf": null,
|
104
|
+
"tenant": null,
|
105
|
+
"status": {
|
106
|
+
"value": "active",
|
107
|
+
"label": "Active",
|
108
|
+
"id": 1
|
109
|
+
},
|
110
|
+
"role": null,
|
111
|
+
"interface": {
|
112
|
+
"id": 18,
|
113
|
+
"url": "http://0.0.0.0:8000/api/virtualization/interfaces/18/",
|
114
|
+
"device": null,
|
115
|
+
"virtual_machine": {
|
116
|
+
"id": 3,
|
117
|
+
"url": "http://0.0.0.0:8000/api/virtualization/virtual-machines/3.json",
|
118
|
+
"name": "rhel_virtual_host.tier.example.com"
|
119
|
+
},
|
120
|
+
"name": "eth1"
|
121
|
+
},
|
122
|
+
"nat_inside": null,
|
123
|
+
"nat_outside": null,
|
124
|
+
"dns_name": "",
|
125
|
+
"description": "",
|
126
|
+
"tags": [
|
127
|
+
"foreman"
|
128
|
+
],
|
129
|
+
"custom_fields": {},
|
130
|
+
"created": "2020-07-13",
|
131
|
+
"last_updated": "2020-07-13T14:58:09.116896Z"
|
132
|
+
}
|
133
|
+
]
|
134
|
+
},
|
135
|
+
"interfaces": {
|
136
|
+
"count": 2,
|
137
|
+
"next": null,
|
138
|
+
"previous": null,
|
139
|
+
"results": [
|
140
|
+
{
|
141
|
+
"id": 17,
|
142
|
+
"virtual_machine": {
|
143
|
+
"id": 3,
|
144
|
+
"url": "http://0.0.0.0:8000/api/virtualization/virtual-machines/3.json",
|
145
|
+
"name": "rhel_virtual_host.tier.example.com"
|
146
|
+
},
|
147
|
+
"name": "eth0",
|
148
|
+
"type": {
|
149
|
+
"value": "virtual",
|
150
|
+
"label": "Virtual"
|
151
|
+
},
|
152
|
+
"enabled": true,
|
153
|
+
"mtu": null,
|
154
|
+
"mac_address": "C3:CD:63:54:21:62",
|
155
|
+
"description": "",
|
156
|
+
"mode": null,
|
157
|
+
"untagged_vlan": null,
|
158
|
+
"tagged_vlans": [],
|
159
|
+
"tags": [
|
160
|
+
"foreman"
|
161
|
+
]
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"id": 18,
|
165
|
+
"virtual_machine": {
|
166
|
+
"id": 3,
|
167
|
+
"url": "http://0.0.0.0:8000/api/virtualization/virtual-machines/3.json",
|
168
|
+
"name": "rhel_virtual_host.tier.example.com"
|
169
|
+
},
|
170
|
+
"name": "eth1",
|
171
|
+
"type": {
|
172
|
+
"value": "virtual",
|
173
|
+
"label": "Virtual"
|
174
|
+
},
|
175
|
+
"enabled": true,
|
176
|
+
"mtu": null,
|
177
|
+
"mac_address": "45:E9:6A:83:02:22",
|
178
|
+
"description": "",
|
179
|
+
"mode": null,
|
180
|
+
"untagged_vlan": null,
|
181
|
+
"tagged_vlans": [],
|
182
|
+
"tags": [
|
183
|
+
"foreman"
|
184
|
+
]
|
185
|
+
}
|
186
|
+
]
|
187
|
+
},
|
188
|
+
"virtual_machine": {
|
189
|
+
"id": 3,
|
190
|
+
"name": "rhel_virtual_host.tier.example.com",
|
191
|
+
"status": {
|
192
|
+
"value": "active",
|
193
|
+
"label": "Active",
|
194
|
+
"id": 1
|
195
|
+
},
|
196
|
+
"site": null,
|
197
|
+
"cluster": {
|
198
|
+
"id": 2,
|
199
|
+
"url": "http://0.0.0.0:8000/api/virtualization/clusters/2.json",
|
200
|
+
"name": "CLUSTER"
|
201
|
+
},
|
202
|
+
"role": null,
|
203
|
+
"tenant": {
|
204
|
+
"id": 89,
|
205
|
+
"url": "http://0.0.0.0:8000/api/tenancy/tenants/89.json",
|
206
|
+
"name": "Owner",
|
207
|
+
"slug": "owner"
|
208
|
+
},
|
209
|
+
"platform": null,
|
210
|
+
"primary_ip": {
|
211
|
+
"id": 18,
|
212
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/18.json",
|
213
|
+
"family": 6,
|
214
|
+
"address": "1600:0:2d0:202::19/64"
|
215
|
+
},
|
216
|
+
"primary_ip4": {
|
217
|
+
"id": 17,
|
218
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/17.json",
|
219
|
+
"family": 4,
|
220
|
+
"address": "10.0.0.9/24"
|
221
|
+
},
|
222
|
+
"primary_ip6": {
|
223
|
+
"id": 18,
|
224
|
+
"url": "http://0.0.0.0:8000/api/ipam/ip-addresses/18.json",
|
225
|
+
"family": 6,
|
226
|
+
"address": "1600:0:2d0:202::19/64"
|
227
|
+
},
|
228
|
+
"vcpus": 1,
|
229
|
+
"memory": 1024,
|
230
|
+
"disk": 120,
|
231
|
+
"comments": "",
|
232
|
+
"local_context_data": null,
|
233
|
+
"tags": [
|
234
|
+
"foreman"
|
235
|
+
],
|
236
|
+
"custom_fields": {},
|
237
|
+
"config_context": {},
|
238
|
+
"created": "2020-07-13",
|
239
|
+
"last_updated": "2020-07-13T14:58:09.546781Z"
|
240
|
+
}
|
241
|
+
}
|