dbus-systemd 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8681d88722217f0f3416f0a2396bb664e8513cfc
4
- data.tar.gz: 2d30190ebeb66385cabc72bda175b3e9a525fedd
3
+ metadata.gz: 1cd2469e3dc60e16cf19abd9bee2e6a6461af4b5
4
+ data.tar.gz: 28b3857611bda2e745538aad82896b087311f83c
5
5
  SHA512:
6
- metadata.gz: a50bac75c3f77bc1af7f938f32b3e72938368423d094ea356d261be2a11d695ee509998ed6cdf19b293f5c120085484d6c8713fa8707ec6a71cc9f91750060c2
7
- data.tar.gz: 8b80ec906aa3b77b58673134e7cff197c87440ab0ea6a48b633f0b32062686692ee88beb3f21cda3c37caec98e01b89a6219af37382466f39670025a7aa05104
6
+ metadata.gz: de319d06ece28ba8b079c4a5475b96f2eb9232312e167dd8a1befdf1f9983a931f357780c4453c6ace2773f46dcd9247c64710124b7d66c953320d6120201c4a
7
+ data.tar.gz: 8d541b384d3f00d06d1c89f8e929e94595f55e9424df20eceffe823742b0409135ccafee8eb763c9b7ca395bc0af3bb74340e08bead31e667a89392154d542eb
data/lib/dbus/systemd.rb CHANGED
@@ -7,6 +7,7 @@ require_relative 'systemd/logind'
7
7
  require_relative 'systemd/machined'
8
8
  require_relative 'systemd/manager'
9
9
  require_relative 'systemd/mixin'
10
+ require_relative 'systemd/networkd'
10
11
  require_relative 'systemd/resolved'
11
12
  require_relative 'systemd/timedated'
12
13
  require_relative 'systemd/unit'
@@ -12,6 +12,7 @@ module DBus
12
12
  INTERFACE = 'org.freedesktop.hostname1'
13
13
 
14
14
  include Mixin::MethodMissing
15
+ include Mixin::Properties
15
16
 
16
17
  attr_reader :service
17
18
 
@@ -21,6 +21,7 @@ module DBus
21
21
  }
22
22
 
23
23
  include Systemd::Mixin::MethodMissing
24
+ include Systemd::Mixin::Properties
24
25
 
25
26
  attr_reader :service
26
27
 
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.import1.Transfer'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(id, manager = Manager.new)
13
14
  @object = manager.service.object("#{Manager::NODE}/transfer/_#{id}")
@@ -7,6 +7,7 @@ module DBus
7
7
  INTERFACE = 'org.freedesktop.systemd1.Job'
8
8
 
9
9
  include Mixin::MethodMissing
10
+ include Mixin::Properties
10
11
 
11
12
  def initialize(id, manager = Manager.new)
12
13
  job_path = manager.GetJob(id).first
@@ -12,6 +12,7 @@ module DBus
12
12
  INTERFACE = 'org.freedesktop.locale1'
13
13
 
14
14
  include Mixin::MethodMissing
15
+ include Mixin::Properties
15
16
 
16
17
  attr_reader :service
17
18
 
@@ -42,6 +42,7 @@ module DBus
42
42
  }
43
43
 
44
44
  include Systemd::Mixin::MethodMissing
45
+ include Systemd::Mixin::Properties
45
46
 
46
47
  attr_reader :service
47
48
 
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.login1.Seat'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(id, manager = Manager.new)
13
14
  seat_path = manager.GetSeat(id).first
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.login1.Session'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(id, manager = Manager.new)
13
14
  session_path = manager.GetSession(id).first
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.login1.User'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(id, manager = Manager.new)
13
14
  user_path = manager.GetUser(id).first
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.machine1.Image'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(name, manager = Manager.new)
13
14
  image_path = manager.GetImage(name).first
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.machine1.Machine'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(name, manager = Manager.new)
13
14
  machine_path = manager.GetMachine(name).first
@@ -30,6 +30,7 @@ module DBus
30
30
  }
31
31
 
32
32
  include Systemd::Mixin::MethodMissing
33
+ include Systemd::Mixin::Properties
33
34
 
34
35
  attr_reader :service
35
36
 
@@ -38,6 +38,7 @@ module DBus
38
38
  }
39
39
 
40
40
  include Mixin::MethodMissing
41
+ include Mixin::Properties
41
42
 
42
43
  attr_reader :service
43
44
 
@@ -16,6 +16,12 @@ module DBus
16
16
  @object.respond_to?(*args) || super
17
17
  end
18
18
  end
19
+
20
+ module Properties
21
+ def properties(interface = self.class::INTERFACE)
22
+ self.GetAll(interface).first
23
+ end
24
+ end
19
25
  end
20
26
  end
21
27
  end
@@ -0,0 +1,2 @@
1
+ require_relative 'networkd/manager'
2
+ require_relative 'networkd/link'
@@ -0,0 +1,20 @@
1
+ require_relative '../mixin'
2
+ require_relative 'manager'
3
+
4
+ module DBus
5
+ module Systemd
6
+ module Networkd
7
+ class Link
8
+ INTERFACE = 'org.freedesktop.network1.Link'
9
+
10
+ include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
12
+
13
+ def initialize(id, manager = Manager.new)
14
+ @object = manager.service.object("#{Manager::NODE}/link/#{id}")
15
+ .tap(&:introspect)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,31 @@
1
+ require_relative '../helpers'
2
+ require_relative '../mixin'
3
+ require_relative 'link'
4
+
5
+ module DBus
6
+ module Systemd
7
+ module Networkd
8
+ INTERFACE = 'org.freedesktop.network1'
9
+
10
+ class Manager
11
+ NODE = '/org/freedesktop/network1'
12
+ INTERFACE = 'org.freedesktop.network1.Manager'
13
+
14
+ include Systemd::Mixin::MethodMissing
15
+ include Systemd::Mixin::Properties
16
+
17
+ attr_reader :service
18
+
19
+ def initialize(bus = Systemd::Helpers.system_bus)
20
+ @service = bus.service(Networkd::INTERFACE)
21
+ @object = @service.object(NODE)
22
+ .tap(&:introspect)
23
+ end
24
+
25
+ def link(id)
26
+ Link.new(id, self)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.resolve1.Link'
9
9
 
10
10
  include Systemd::Mixin::MethodMissing
11
+ include Systemd::Mixin::Properties
11
12
 
12
13
  def initialize(id, manager = Manager.new)
13
14
  link_path = manager.GetLink(id).first
@@ -12,6 +12,7 @@ module DBus
12
12
  INTERFACE = 'org.freedesktop.resolve1.Manager'
13
13
 
14
14
  include Systemd::Mixin::MethodMissing
15
+ include Systemd::Mixin::Properties
15
16
 
16
17
  attr_reader :service
17
18
 
@@ -8,6 +8,7 @@ module DBus
8
8
  INTERFACE = 'org.freedesktop.timedate1'
9
9
 
10
10
  include Mixin::MethodMissing
11
+ include Mixin::Properties
11
12
 
12
13
  attr_reader :service
13
14
 
@@ -7,6 +7,7 @@ module DBus
7
7
  INTERFACE = 'org.freedesktop.systemd1.Unit'
8
8
 
9
9
  include Mixin::MethodMissing
10
+ include Mixin::Properties
10
11
 
11
12
  def initialize(name, manager = Manager.new)
12
13
  unit_path = manager.GetUnit(name).first
@@ -1,5 +1,5 @@
1
1
  module DBus
2
2
  module Systemd
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbus-systemd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Williams
@@ -104,6 +104,9 @@ files:
104
104
  - lib/dbus/systemd/machined/manager.rb
105
105
  - lib/dbus/systemd/manager.rb
106
106
  - lib/dbus/systemd/mixin.rb
107
+ - lib/dbus/systemd/networkd.rb
108
+ - lib/dbus/systemd/networkd/link.rb
109
+ - lib/dbus/systemd/networkd/manager.rb
107
110
  - lib/dbus/systemd/resolved.rb
108
111
  - lib/dbus/systemd/resolved/link.rb
109
112
  - lib/dbus/systemd/resolved/manager.rb