netbox-client-ruby 0.5.4 → 0.5.5
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/VERSION +1 -1
- data/lib/netbox_client_ruby/api.rb +5 -0
- data/lib/netbox_client_ruby/api/dcim/device.rb +1 -0
- data/lib/netbox_client_ruby/api/extras.rb +20 -0
- data/lib/netbox_client_ruby/api/extras/tag.rb +14 -0
- data/lib/netbox_client_ruby/api/extras/tags.rb +21 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55bbd9dd0203bcfe5c840d50a36267993a7eef021f327c4eb09cfc6b386fae50
|
4
|
+
data.tar.gz: 764e38fc0bc4928e7951e8f0f10eed8c35d6e69651851d9c72e09ac9fd1b04c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80f8d490bc49670339fc21e091a084be8478ee8c4562daa00635e94e5d162fd8ee0db0b8bd07b2288e144a5bf6317c68e5b7b2c66380df22510c5b7ad65a8d0e
|
7
|
+
data.tar.gz: 3f88931867f63cb1fbe049ef59682086eba3ccf19e88a5265238caf19be9b2ff76eed488567a4bc2159951261e4106445611ea620e540adcd5d641c725b1baf5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'netbox_client_ruby/api/circuits'
|
2
2
|
require 'netbox_client_ruby/api/dcim'
|
3
|
+
require 'netbox_client_ruby/api/extras'
|
3
4
|
require 'netbox_client_ruby/api/ipam'
|
4
5
|
require 'netbox_client_ruby/api/secrets'
|
5
6
|
require 'netbox_client_ruby/api/tenancy'
|
@@ -15,6 +16,10 @@ module NetboxClientRuby
|
|
15
16
|
NetboxClientRuby::DCIM
|
16
17
|
end
|
17
18
|
|
19
|
+
def self.extras
|
20
|
+
NetboxClientRuby::Extras
|
21
|
+
end
|
22
|
+
|
18
23
|
def self.ipam
|
19
24
|
NetboxClientRuby::IPAM
|
20
25
|
end
|
@@ -29,6 +29,7 @@ module NetboxClientRuby
|
|
29
29
|
primary_ip4: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
30
30
|
primary_ip6: proc { |raw_data| IPAM::IpAddress.new raw_data['id'] },
|
31
31
|
virtual_chassis: proc { |raw_data| DCIM::VirtualChassis.new raw_data['id'] },
|
32
|
+
tags: proc { |raw_data| Extras::Tag.new raw_data['id'] },
|
32
33
|
)
|
33
34
|
end
|
34
35
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'netbox_client_ruby/api/extras/tag'
|
2
|
+
require 'netbox_client_ruby/api/extras/tags'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module Extras
|
6
|
+
{
|
7
|
+
tags: Tags
|
8
|
+
}.each_pair do |method_name, class_name|
|
9
|
+
define_method(method_name) { class_name.new }
|
10
|
+
module_function(method_name)
|
11
|
+
end
|
12
|
+
|
13
|
+
{
|
14
|
+
tag: Tag
|
15
|
+
}.each_pair do |method_name, class_name|
|
16
|
+
define_method(method_name) { |id| class_name.new id }
|
17
|
+
module_function(method_name)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'netbox_client_ruby/entities'
|
2
|
+
require 'netbox_client_ruby/api/extras/tag'
|
3
|
+
|
4
|
+
module NetboxClientRuby
|
5
|
+
module Extras
|
6
|
+
class Tags
|
7
|
+
include Entities
|
8
|
+
|
9
|
+
path 'extras/tags.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
|
+
Tag.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.5
|
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: 2021-
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -276,6 +276,9 @@ files:
|
|
276
276
|
- lib/netbox_client_ruby/api/dcim/sites.rb
|
277
277
|
- lib/netbox_client_ruby/api/dcim/virtual_chassis.rb
|
278
278
|
- lib/netbox_client_ruby/api/dcim/virtual_chassis_list.rb
|
279
|
+
- lib/netbox_client_ruby/api/extras.rb
|
280
|
+
- lib/netbox_client_ruby/api/extras/tag.rb
|
281
|
+
- lib/netbox_client_ruby/api/extras/tags.rb
|
279
282
|
- lib/netbox_client_ruby/api/ipam.rb
|
280
283
|
- lib/netbox_client_ruby/api/ipam/aggregate.rb
|
281
284
|
- lib/netbox_client_ruby/api/ipam/aggregates.rb
|