netbox-client-ruby 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +45 -37
- data/VERSION +1 -1
- data/lib/netbox_client_ruby/api/circuits.rb +2 -2
- data/lib/netbox_client_ruby/api/circuits/{circuit_list.rb → circuits.rb} +1 -1
- data/lib/netbox_client_ruby/api/dcim.rb +26 -2
- data/lib/netbox_client_ruby/api/dcim/console_connection.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_port.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_ports.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_server_port.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/console_server_ports.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/device.rb +3 -1
- data/lib/netbox_client_ruby/api/dcim/interface_connection.rb +20 -0
- data/lib/netbox_client_ruby/api/dcim/interface_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/power_connection.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/power_connections.rb +21 -0
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis.rb +19 -0
- data/lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb +21 -0
- metadata +15 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85ce04cb9854fd468e6c4d99c2233d84e133a7488179cfdbcea8a1e89f2a4fec
|
4
|
+
data.tar.gz: 88e8bbfed0e980c15e31baa5c90b477a85a4131a567773be557c0f566031b9e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0e0f3ae1cb4d7975292edee8692835c278759f46e1fe271a405f1580cb2b061e738b0daf50e55250edb12cf7e3a74eeebf939b4e3f8e4c954e250ebc7a6a50
|
7
|
+
data.tar.gz: 0ebd13d8c1b3282510aaff72cd0d8c8f08484f43e696a98a22040f4495446f57783c47dc00b47fd4a40d00341496622e3025bf46d83531bfc1f045203e94524c
|
data/README.md
CHANGED
@@ -135,48 +135,56 @@ Not all objects which the Netbox API exposes are currently implemented. Implemen
|
|
135
135
|
[is trivial](https://github.com/ninech/netbox-client-ruby/commit/e3cee19d21a8a6ce480d7c03d23d7c3fbc92417a), though.
|
136
136
|
|
137
137
|
* Circuits:
|
138
|
-
* Circuits
|
139
|
-
* Circuit Types
|
140
|
-
* Circuit Terminations
|
141
|
-
* Providers
|
138
|
+
* Circuits: `NetboxClientRuby.circuits.circuits`
|
139
|
+
* Circuit Types: `NetboxClientRuby.circuits.circuit_types`
|
140
|
+
* Circuit Terminations: `NetboxClientRuby.circuits.circuit_terminations`
|
141
|
+
* Providers: `NetboxClientRuby.circuits.providers`
|
142
142
|
* DCIM:
|
143
|
-
*
|
144
|
-
*
|
145
|
-
*
|
146
|
-
*
|
147
|
-
*
|
148
|
-
*
|
149
|
-
*
|
150
|
-
*
|
151
|
-
*
|
152
|
-
*
|
153
|
-
*
|
154
|
-
*
|
155
|
-
*
|
156
|
-
*
|
143
|
+
* Console Connections: `NetboxClientRuby.dcim.console_connections`
|
144
|
+
* Console Ports: `NetboxClientRuby.dcim.console_ports`
|
145
|
+
* Console Server Ports: `NetboxClientRuby.dcim.console_server_ports`
|
146
|
+
* Devices: `NetboxClientRuby.dcim.devices`
|
147
|
+
* Device Roles: `NetboxClientRuby.dcim.device_roles`
|
148
|
+
* Device Types: `NetboxClientRuby.dcim.device_types`
|
149
|
+
* Interfaces: `NetboxClientRuby.dcim.interfaces`
|
150
|
+
* Interface Connections: `NetboxClientRuby.dcim.interface_connections`
|
151
|
+
* Manufacturers: `NetboxClientRuby.dcim.manufacturers`
|
152
|
+
* Platforms: `NetboxClientRuby.dcim.platforms`
|
153
|
+
* Power Connections: `NetboxClientRuby.dcim.power_connections`
|
154
|
+
* Power Outlets: `NetboxClientRuby.dcim.power_outlets`
|
155
|
+
* Power Ports: `NetboxClientRuby.dcim.power_ports`
|
156
|
+
* Racks: `NetboxClientRuby.dcim.racks`
|
157
|
+
* Rack Groups: `NetboxClientRuby.dcim.rack_groups`
|
158
|
+
* Rack Roles: `NetboxClientRuby.dcim.rack_roles`
|
159
|
+
* Rack Reservations: `NetboxClientRuby.dcim.rack_reservations`
|
160
|
+
* Regions: `NetboxClientRuby.dcim.regions`
|
161
|
+
* Sites: `NetboxClientRuby.dcim.sites`
|
162
|
+
* Virtual Chassis: `NetboxClientRuby.dcim.virtual_chassis_list`
|
163
|
+
(⚠️ Exception: The access is different and the class is called `VirtualChassisList` because the plural and singular
|
164
|
+
names are the same and this poses a conflict.)
|
157
165
|
* IPAM:
|
158
|
-
* Aggregates
|
159
|
-
* IP Addresses
|
160
|
-
* Prefixes
|
161
|
-
* RIRs
|
162
|
-
* Roles
|
163
|
-
* VLANs
|
164
|
-
* VLAN Groups
|
165
|
-
* VRFs
|
166
|
+
* Aggregates: `NetboxClientRuby.ipam.aggregates`
|
167
|
+
* IP Addresses: `NetboxClientRuby.ipam.ip_addresses`
|
168
|
+
* Prefixes: `NetboxClientRuby.ipam.prefixes`
|
169
|
+
* RIRs: `NetboxClientRuby.ipam.rirs`
|
170
|
+
* Roles: `NetboxClientRuby.ipam.roles`
|
171
|
+
* VLANs: `NetboxClientRuby.ipam.vlans`
|
172
|
+
* VLAN Groups: `NetboxClientRuby.ipam.vlan_groups`
|
173
|
+
* VRFs: `NetboxClientRuby.ipam.vrfs`
|
166
174
|
* Secrets:
|
167
|
-
* Secrets
|
168
|
-
* Secret Roles
|
169
|
-
*
|
170
|
-
*
|
175
|
+
* Secrets: `NetboxClientRuby.secrets.secrets`
|
176
|
+
* Secret Roles: `NetboxClientRuby.secrets.secret_roles`
|
177
|
+
* generate-rsa-key-pair: `NetboxClientRuby.secrets.generate_rsa_key_pair`
|
178
|
+
* get-session-key: `NetboxClientRuby.secrets.get_session_key`
|
171
179
|
* Tenancy:
|
172
|
-
* Tenant
|
173
|
-
* Tenant Groups
|
180
|
+
* Tenant: `NetboxClientRuby.tenancy.tenants`
|
181
|
+
* Tenant Groups: `NetboxClientRuby.tenancy.tenant_groups`
|
174
182
|
* Virtualization:
|
175
|
-
* Cluster Types
|
176
|
-
* Cluster Groups
|
177
|
-
* Clusters
|
178
|
-
* Virtual Machines
|
179
|
-
* Interfaces
|
183
|
+
* Cluster Types: `NetboxClientRuby.virtualization.cluster_types`
|
184
|
+
* Cluster Groups: `NetboxClientRuby.virtualization.cluster_groups`
|
185
|
+
* Clusters: `NetboxClientRuby.virtualization.clusters`
|
186
|
+
* Virtual Machines: `NetboxClientRuby.virtualization.virtual_machines`
|
187
|
+
* Interfaces: `NetboxClientRuby.virtualization.interfaces`
|
180
188
|
|
181
189
|
If you can't find the object you need, also check
|
182
190
|
[the source code](https://github.com/ninech/netbox-client-ruby/tree/master/lib/netbox_client_ruby/api)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'netbox_client_ruby/api/circuits/circuit'
|
2
|
-
require 'netbox_client_ruby/api/circuits/
|
2
|
+
require 'netbox_client_ruby/api/circuits/circuits'
|
3
3
|
require 'netbox_client_ruby/api/circuits/circuit_termination'
|
4
4
|
require 'netbox_client_ruby/api/circuits/circuit_terminations'
|
5
5
|
require 'netbox_client_ruby/api/circuits/circuit_type'
|
@@ -12,7 +12,7 @@ module NetboxClientRuby
|
|
12
12
|
module Circuits
|
13
13
|
{
|
14
14
|
providers: Providers,
|
15
|
-
circuits:
|
15
|
+
circuits: Circuits,
|
16
16
|
circuit_types: CircuitTypes,
|
17
17
|
circuit_terminations: CircuitTerminations
|
18
18
|
}.each_pair do |method_name, class_name|
|
@@ -1,3 +1,9 @@
|
|
1
|
+
require 'netbox_client_ruby/api/dcim/console_connection'
|
2
|
+
require 'netbox_client_ruby/api/dcim/console_connections'
|
3
|
+
require 'netbox_client_ruby/api/dcim/console_port'
|
4
|
+
require 'netbox_client_ruby/api/dcim/console_ports'
|
5
|
+
require 'netbox_client_ruby/api/dcim/console_server_port'
|
6
|
+
require 'netbox_client_ruby/api/dcim/console_server_ports'
|
1
7
|
require 'netbox_client_ruby/api/dcim/device'
|
2
8
|
require 'netbox_client_ruby/api/dcim/devices'
|
3
9
|
require 'netbox_client_ruby/api/dcim/device_role'
|
@@ -5,6 +11,8 @@ require 'netbox_client_ruby/api/dcim/device_roles'
|
|
5
11
|
require 'netbox_client_ruby/api/dcim/device_type'
|
6
12
|
require 'netbox_client_ruby/api/dcim/device_types'
|
7
13
|
require 'netbox_client_ruby/api/dcim/interface'
|
14
|
+
require 'netbox_client_ruby/api/dcim/interface_connection'
|
15
|
+
require 'netbox_client_ruby/api/dcim/interface_connections'
|
8
16
|
require 'netbox_client_ruby/api/dcim/interfaces'
|
9
17
|
require 'netbox_client_ruby/api/dcim/inventory_item'
|
10
18
|
require 'netbox_client_ruby/api/dcim/inventory_items'
|
@@ -12,6 +20,8 @@ require 'netbox_client_ruby/api/dcim/manufacturer'
|
|
12
20
|
require 'netbox_client_ruby/api/dcim/manufacturers'
|
13
21
|
require 'netbox_client_ruby/api/dcim/platform'
|
14
22
|
require 'netbox_client_ruby/api/dcim/platforms'
|
23
|
+
require 'netbox_client_ruby/api/dcim/power_connection'
|
24
|
+
require 'netbox_client_ruby/api/dcim/power_connections'
|
15
25
|
require 'netbox_client_ruby/api/dcim/power_outlet'
|
16
26
|
require 'netbox_client_ruby/api/dcim/power_outlets'
|
17
27
|
require 'netbox_client_ruby/api/dcim/power_port'
|
@@ -28,18 +38,25 @@ require 'netbox_client_ruby/api/dcim/region'
|
|
28
38
|
require 'netbox_client_ruby/api/dcim/regions'
|
29
39
|
require 'netbox_client_ruby/api/dcim/site'
|
30
40
|
require 'netbox_client_ruby/api/dcim/sites'
|
41
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis'
|
42
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis_list'
|
31
43
|
require 'netbox_client_ruby/communication'
|
32
44
|
|
33
45
|
module NetboxClientRuby
|
34
46
|
module DCIM
|
35
47
|
{
|
48
|
+
console_connections: ConsoleConnections,
|
49
|
+
console_ports: ConsolePorts,
|
50
|
+
console_server_ports: ConsoleServerPorts,
|
36
51
|
devices: Devices,
|
37
52
|
device_roles: DeviceRoles,
|
38
53
|
device_types: DeviceTypes,
|
39
54
|
interfaces: Interfaces,
|
55
|
+
interface_connections: InterfaceConnections,
|
40
56
|
inventory_items: InventoryItems,
|
41
57
|
manufacturers: Manufacturers,
|
42
58
|
platforms: Platforms,
|
59
|
+
power_connections: PowerConnections,
|
43
60
|
power_outlets: PowerOutlets,
|
44
61
|
power_ports: PowerPorts,
|
45
62
|
racks: Racks,
|
@@ -47,20 +64,26 @@ module NetboxClientRuby
|
|
47
64
|
rack_reservations: RackReservations,
|
48
65
|
rack_roles: RackRoles,
|
49
66
|
regions: Regions,
|
50
|
-
sites: Sites
|
67
|
+
sites: Sites,
|
68
|
+
virtual_chassis_list: VirtualChassisList
|
51
69
|
}.each_pair do |method_name, class_name|
|
52
70
|
define_method(method_name) { class_name.new }
|
53
71
|
module_function(method_name)
|
54
72
|
end
|
55
73
|
|
56
74
|
{
|
75
|
+
console_connection: ConsoleConnection,
|
76
|
+
console_port: ConsolePort,
|
77
|
+
console_server_port: ConsoleServerPort,
|
57
78
|
device: Device,
|
58
79
|
device_role: DeviceRole,
|
59
80
|
device_type: DeviceType,
|
60
81
|
interface: Interface,
|
82
|
+
interface_connection: InterfaceConnection,
|
61
83
|
inventory_item: InventoryItem,
|
62
84
|
manufacturer: Manufacturer,
|
63
85
|
platform: Platform,
|
86
|
+
power_connection: PowerConnection,
|
64
87
|
power_outlet: PowerOutlet,
|
65
88
|
power_port: PowerPort,
|
66
89
|
rack: Rack,
|
@@ -68,7 +91,8 @@ module NetboxClientRuby
|
|
68
91
|
rack_reservation: RackReservation,
|
69
92
|
rack_role: RackRole,
|
70
93
|
region: Region,
|
71
|
-
site: Site
|
94
|
+
site: Site,
|
95
|
+
virtual_chassis: VirtualChassis
|
72
96
|
}.each_pair do |method_name, class_name|
|
73
97
|
define_method(method_name) { |id| class_name.new id }
|
74
98
|
module_function(method_name)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
3
|
+
require 'netbox_client_ruby/api/dcim/console_server_port'
|
4
|
+
|
5
|
+
module NetboxClientRuby
|
6
|
+
module DCIM
|
7
|
+
class ConsoleConnection
|
8
|
+
include Entity
|
9
|
+
|
10
|
+
id id: :id
|
11
|
+
deletable true
|
12
|
+
path 'dcim/console-connections/:id.json'
|
13
|
+
creation_path 'dcim/console-connections/'
|
14
|
+
|
15
|
+
object_fields(
|
16
|
+
device: proc { |raw_data| Device.new raw_data['id'] },
|
17
|
+
cs_port: proc { |raw_data| ConsoleServerPort.new raw_data['id'] },
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/console_connection'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class ConsoleConnections
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/console-connections.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
ConsoleConnection.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
3
|
+
require 'netbox_client_ruby/api/dcim/console_server_port'
|
4
|
+
|
5
|
+
module NetboxClientRuby
|
6
|
+
module DCIM
|
7
|
+
class ConsolePort
|
8
|
+
include Entity
|
9
|
+
|
10
|
+
id id: :id
|
11
|
+
deletable true
|
12
|
+
path 'dcim/console-ports/:id.json'
|
13
|
+
creation_path 'dcim/console-ports/'
|
14
|
+
|
15
|
+
object_fields(
|
16
|
+
device: proc { |raw_data| Device.new raw_data['id'] },
|
17
|
+
cs_port: proc { |raw_data| ConsoleServerPort.new raw_data['id'] },
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/console_port'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class ConsolePorts
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/console-ports.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
ConsolePort.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
3
|
+
require 'netbox_client_ruby/api/dcim/console_port'
|
4
|
+
|
5
|
+
module NetboxClientRuby
|
6
|
+
module DCIM
|
7
|
+
class ConsoleServerPort
|
8
|
+
include Entity
|
9
|
+
|
10
|
+
id id: :id
|
11
|
+
deletable true
|
12
|
+
path 'dcim/console-server-ports/:id.json'
|
13
|
+
creation_path 'dcim/console-server-ports/'
|
14
|
+
|
15
|
+
object_fields(
|
16
|
+
device: proc { |raw_data| Device.new raw_data['id'] },
|
17
|
+
connected_console: proc { |raw_data| ConsolePort.new raw_data },
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/console_server_port'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class ConsoleServerPorts
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/console-server-ports.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
ConsoleServerPort.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -5,6 +5,7 @@ require 'netbox_client_ruby/api/tenancy/tenant'
|
|
5
5
|
require 'netbox_client_ruby/api/dcim/platform'
|
6
6
|
require 'netbox_client_ruby/api/dcim/site'
|
7
7
|
require 'netbox_client_ruby/api/dcim/rack'
|
8
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis'
|
8
9
|
require 'netbox_client_ruby/api/ipam/ip_address'
|
9
10
|
|
10
11
|
module NetboxClientRuby
|
@@ -26,7 +27,8 @@ module NetboxClientRuby
|
|
26
27
|
parent_device: proc { |raw_data| Device.new raw_data['id'] },
|
27
28
|
primary_ip: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
28
29
|
primary_ip4: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
29
|
-
primary_ip6: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] }
|
30
|
+
primary_ip6: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
31
|
+
virtual_chassis: proc { |raw_data| DCIM::VirtualChassis.new raw_data['id'] },
|
30
32
|
)
|
31
33
|
end
|
32
34
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/interface'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class InterfaceConnection
|
7
|
+
include Entity
|
8
|
+
|
9
|
+
id id: :id
|
10
|
+
deletable true
|
11
|
+
path 'dcim/interface-connections/:id.json'
|
12
|
+
creation_path 'dcim/interface-connections/'
|
13
|
+
|
14
|
+
object_fields(
|
15
|
+
interface_a: proc { |raw_data| Interface.new raw_data['id'] },
|
16
|
+
interface_b: proc { |raw_data| Interface.new raw_data['id'] },
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/interface_connection'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class InterfaceConnections
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/interface-connections.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
InterfaceConnection.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
3
|
+
require 'netbox_client_ruby/api/dcim/power_outlet'
|
4
|
+
|
5
|
+
module NetboxClientRuby
|
6
|
+
module DCIM
|
7
|
+
class PowerConnection
|
8
|
+
include Entity
|
9
|
+
|
10
|
+
id id: :id
|
11
|
+
deletable true
|
12
|
+
path 'dcim/power-connections/:id.json'
|
13
|
+
creation_path 'dcim/power-connections/'
|
14
|
+
|
15
|
+
object_fields(
|
16
|
+
device: proc { |raw_data| Device.new raw_data['id'] },
|
17
|
+
power_outlet: proc { |raw_data| PowerOutlet.new raw_data['id'] },
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/power_connection'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class PowerConnections
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/power-connections.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
PowerConnection.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/device'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class VirtualChassis
|
7
|
+
include Entity
|
8
|
+
|
9
|
+
id id: :id
|
10
|
+
deletable true
|
11
|
+
path 'dcim/virtual-chassis/:id.json'
|
12
|
+
creation_path 'dcim/virtual-chassis/'
|
13
|
+
|
14
|
+
object_fields(
|
15
|
+
master: proc { |raw_data| Device.new raw_data['id'] },
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/dcim/virtual_chassis'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class VirtualChassisList
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/virtual-chassis.json'
|
10
|
+
data_key 'results'
|
11
|
+
count_key 'count'
|
12
|
+
entity_creator :entity_creator
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def entity_creator(raw_entity)
|
17
|
+
VirtualChassis.new raw_entity['id']
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netbox-client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Mäder
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -225,14 +225,20 @@ files:
|
|
225
225
|
- lib/netbox_client_ruby/api.rb
|
226
226
|
- lib/netbox_client_ruby/api/circuits.rb
|
227
227
|
- lib/netbox_client_ruby/api/circuits/circuit.rb
|
228
|
-
- lib/netbox_client_ruby/api/circuits/circuit_list.rb
|
229
228
|
- lib/netbox_client_ruby/api/circuits/circuit_termination.rb
|
230
229
|
- lib/netbox_client_ruby/api/circuits/circuit_terminations.rb
|
231
230
|
- lib/netbox_client_ruby/api/circuits/circuit_type.rb
|
232
231
|
- lib/netbox_client_ruby/api/circuits/circuit_types.rb
|
232
|
+
- lib/netbox_client_ruby/api/circuits/circuits.rb
|
233
233
|
- lib/netbox_client_ruby/api/circuits/provider.rb
|
234
234
|
- lib/netbox_client_ruby/api/circuits/providers.rb
|
235
235
|
- lib/netbox_client_ruby/api/dcim.rb
|
236
|
+
- lib/netbox_client_ruby/api/dcim/console_connection.rb
|
237
|
+
- lib/netbox_client_ruby/api/dcim/console_connections.rb
|
238
|
+
- lib/netbox_client_ruby/api/dcim/console_port.rb
|
239
|
+
- lib/netbox_client_ruby/api/dcim/console_ports.rb
|
240
|
+
- lib/netbox_client_ruby/api/dcim/console_server_port.rb
|
241
|
+
- lib/netbox_client_ruby/api/dcim/console_server_ports.rb
|
236
242
|
- lib/netbox_client_ruby/api/dcim/device.rb
|
237
243
|
- lib/netbox_client_ruby/api/dcim/device_role.rb
|
238
244
|
- lib/netbox_client_ruby/api/dcim/device_roles.rb
|
@@ -240,6 +246,8 @@ files:
|
|
240
246
|
- lib/netbox_client_ruby/api/dcim/device_types.rb
|
241
247
|
- lib/netbox_client_ruby/api/dcim/devices.rb
|
242
248
|
- lib/netbox_client_ruby/api/dcim/interface.rb
|
249
|
+
- lib/netbox_client_ruby/api/dcim/interface_connection.rb
|
250
|
+
- lib/netbox_client_ruby/api/dcim/interface_connections.rb
|
243
251
|
- lib/netbox_client_ruby/api/dcim/interfaces.rb
|
244
252
|
- lib/netbox_client_ruby/api/dcim/inventory_item.rb
|
245
253
|
- lib/netbox_client_ruby/api/dcim/inventory_items.rb
|
@@ -247,6 +255,8 @@ files:
|
|
247
255
|
- lib/netbox_client_ruby/api/dcim/manufacturers.rb
|
248
256
|
- lib/netbox_client_ruby/api/dcim/platform.rb
|
249
257
|
- lib/netbox_client_ruby/api/dcim/platforms.rb
|
258
|
+
- lib/netbox_client_ruby/api/dcim/power_connection.rb
|
259
|
+
- lib/netbox_client_ruby/api/dcim/power_connections.rb
|
250
260
|
- lib/netbox_client_ruby/api/dcim/power_outlet.rb
|
251
261
|
- lib/netbox_client_ruby/api/dcim/power_outlets.rb
|
252
262
|
- lib/netbox_client_ruby/api/dcim/power_port.rb
|
@@ -263,6 +273,8 @@ files:
|
|
263
273
|
- lib/netbox_client_ruby/api/dcim/regions.rb
|
264
274
|
- lib/netbox_client_ruby/api/dcim/site.rb
|
265
275
|
- lib/netbox_client_ruby/api/dcim/sites.rb
|
276
|
+
- lib/netbox_client_ruby/api/dcim/virtual_chassis.rb
|
277
|
+
- lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb
|
266
278
|
- lib/netbox_client_ruby/api/ipam.rb
|
267
279
|
- lib/netbox_client_ruby/api/ipam/aggregate.rb
|
268
280
|
- lib/netbox_client_ruby/api/ipam/aggregates.rb
|