netbox-client-ruby 0.1.3 → 0.1.4
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/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/VERSION +1 -1
- data/lib/netbox_client_ruby/api/dcim.rb +4 -0
- data/lib/netbox_client_ruby/api/dcim/rack_group.rb +20 -0
- data/lib/netbox_client_ruby/api/dcim/rack_groups.rb +21 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c2790971b77b46de9951fa49827fb7af234c5ec
|
4
|
+
data.tar.gz: c1df33a387651063eafc6106f3aa9c3161920a44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac02e9bd64f9105a65f90b6436476b16224f2b32df3bb67703c38252e4e8d310272d5bbc8abdce6d81cd8c30546cdfc2d90d70a3baa70452c54bd7fea2628dc8
|
7
|
+
data.tar.gz: 2df624834a8dbcff6776e63c61a62323f67288fed3b0c302d926791bb40541330ff267c6705134bcb3c918f4a6f4441eb2aae3a3b55edd4997b2620964a311ff
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
@@ -17,6 +17,8 @@ require 'netbox_client_ruby/api/dcim/power_outlets'
|
|
17
17
|
require 'netbox_client_ruby/api/dcim/power_port'
|
18
18
|
require 'netbox_client_ruby/api/dcim/power_ports'
|
19
19
|
require 'netbox_client_ruby/api/dcim/rack'
|
20
|
+
require 'netbox_client_ruby/api/dcim/rack_group'
|
21
|
+
require 'netbox_client_ruby/api/dcim/rack_groups'
|
20
22
|
require 'netbox_client_ruby/api/dcim/racks'
|
21
23
|
require 'netbox_client_ruby/api/dcim/region'
|
22
24
|
require 'netbox_client_ruby/api/dcim/regions'
|
@@ -37,6 +39,7 @@ module NetboxClientRuby
|
|
37
39
|
power_outlets: PowerOutlets,
|
38
40
|
power_ports: PowerPorts,
|
39
41
|
racks: Racks,
|
42
|
+
rack_groups: RackGroups,
|
40
43
|
regions: Regions,
|
41
44
|
sites: Sites
|
42
45
|
}.each_pair do |method_name, class_name|
|
@@ -55,6 +58,7 @@ module NetboxClientRuby
|
|
55
58
|
power_outlet: PowerOutlet,
|
56
59
|
power_port: PowerPort,
|
57
60
|
rack: Rack,
|
61
|
+
rack_group: RackGroup,
|
58
62
|
region: Region,
|
59
63
|
site: Site
|
60
64
|
}.each_pair do |method_name, class_name|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'netbox_client_ruby/entity'
|
2
|
+
require 'netbox_client_ruby/api/dcim/region'
|
3
|
+
require 'netbox_client_ruby/api/tenancy/tenant'
|
4
|
+
|
5
|
+
module NetboxClientRuby
|
6
|
+
module DCIM
|
7
|
+
class RackGroup
|
8
|
+
include Entity
|
9
|
+
|
10
|
+
id id: :id
|
11
|
+
deletable true
|
12
|
+
path 'dcim/rack-groups/:id.json'
|
13
|
+
creation_path 'dcim/rack-groups/'
|
14
|
+
object_fields(
|
15
|
+
region: proc { |raw_data| DCIM::Region.new raw_data['id'] },
|
16
|
+
tenant: proc { |raw_data| Tenancy::Tenant.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/rack_group'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module DCIM
|
6
|
+
class RackGroups
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'dcim/rack-groups.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
|
+
RackGroup.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.1.
|
4
|
+
version: 0.1.4
|
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: 2017-10-
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -227,6 +227,8 @@ files:
|
|
227
227
|
- lib/netbox_client_ruby/api/dcim/power_port.rb
|
228
228
|
- lib/netbox_client_ruby/api/dcim/power_ports.rb
|
229
229
|
- lib/netbox_client_ruby/api/dcim/rack.rb
|
230
|
+
- lib/netbox_client_ruby/api/dcim/rack_group.rb
|
231
|
+
- lib/netbox_client_ruby/api/dcim/rack_groups.rb
|
230
232
|
- lib/netbox_client_ruby/api/dcim/racks.rb
|
231
233
|
- lib/netbox_client_ruby/api/dcim/region.rb
|
232
234
|
- lib/netbox_client_ruby/api/dcim/regions.rb
|