archipel-api 4 → 5

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: 475d4a92a09d54d426ca4a446c4aad744e40df33
4
- data.tar.gz: 622401326c20d369a4689a5d018db531604c2407
3
+ metadata.gz: bfedb12078b1d60c1415c991e5c4ac95f482e5b7
4
+ data.tar.gz: 42a12b2aea306c4a79936362935aa05b04b69c4a
5
5
  SHA512:
6
- metadata.gz: 39a0875d3a497ccab74d9a7e37e35d796da10da408ad17b983893018d4a425c1fdec0fdedc2efcc3b8c445828a26e6b6494e093d35c6dd5701ebb789bfd34f92
7
- data.tar.gz: abe4a90afbc1095f02f3dd7b0756bfe0b00a16a7739ed80b353d98da272045da21c293daa1899a429fa63103d53f07d31e289a40662a560214bc0bb69270438b
6
+ metadata.gz: 4a83bd10314dc4629280aa06b45f405ecabbfe39da3105ce5272f2488d00b888051096e77710321b617c362db566a3dc15a35a2e572ca39352c9e8004012fc2a
7
+ data.tar.gz: ba70978f4bce49c0ac2734ef6369ff89f6e05824aeeda5b83b3be29ac83c46a6691f60fd9a53493d833775c9514e3d07583623a74c82f43767598fde24d9a9e4
@@ -36,7 +36,7 @@ class Archipel::Api::Internal::Api
36
36
  end
37
37
 
38
38
  def in_connection
39
- Jabber.debug = @config[:xmpp_debug]
39
+ Jabber.debug = ['true', true].include? @config[:xmpp_debug]
40
40
  client = Jabber::Client.new Jabber::JID.new @config[:login]
41
41
  client.connect @config[:server]
42
42
  client.auth @config[:password]
@@ -73,6 +73,6 @@ class Archipel::Api::Internal::Api
73
73
 
74
74
  private
75
75
  def debug?
76
- @config[:debug]
76
+ ['true', true].include? @config[:debug]
77
77
  end
78
78
  end
@@ -28,14 +28,6 @@ class Archipel::Api::Internal::HypervisorXmlMessages
28
28
  render 'delete_vm', jid: jid
29
29
  end
30
30
 
31
- def grant_permissions jid, user_jid
32
- enabled = %w(settags getavatars setavatar presence message info create shutdown destroy reboot suspend resume xmldesc networkinfo define undefine capabilities nodeinfo network_getnames network_bridges appliance_get appliance_attach appliance_detach appliance_package drives_get oom_getadjust scheduler_jobs scheduler_schedule scheduler_unschedule scheduler_actions vnc_display snapshot_take snapshot_delete snapshot_get snapshot_current snapshot_revert)
33
- disabled = %w(all permission_get permission_getown permission_list permission_set permission_setown subscription_add subscription_remove migrate autostart memory setvcpus free xmppserver_users_list xmppserver_users_number oom_setadjust drives_create drives_delete drives_getiso drives_convert drives_rename vmparking_park)
34
-
35
- render 'grant_permissions', jid: jid, user_jid: user_jid,
36
- enabled_permissions: enabled, disabled_permissions: disabled
37
- end
38
-
39
31
  def list_users page = 0, humans_only = true
40
32
  render 'list_users', page: page, humans_only: humans_only
41
33
  end
@@ -1,7 +1,7 @@
1
1
  module Archipel
2
2
  module Api
3
3
  module Internal
4
- VERSION = '4'
4
+ VERSION = '5'
5
5
  end
6
6
  end
7
7
  end
@@ -20,7 +20,7 @@
20
20
  <apic/>
21
21
  </features>
22
22
  <devices>
23
- <emulator>/usr/bin/qemu-kvm</emulator>
23
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
24
24
  <disk device="disk" type="file">
25
25
  <driver cache="none" type="qcow2" name="qemu"/>
26
26
  <%= tag :source, file: "/var/lib/libvirt/images/archipel/drives/#{uuid}/disk.qcow2" %>
@@ -43,7 +43,6 @@ class VmInfo
43
43
  attr_reader :cpu_usage, :cpu_number
44
44
 
45
45
  def initialize state, autostart, memory_kib, memory_max_kib, cpu_usage, cpu_number
46
- pp state
47
46
  @state = State.from_int state.to_i
48
47
  @autostart = autostart.to_i == 0 ? false : true
49
48
 
@@ -32,7 +32,6 @@ class Archipel::Api::VmApi < Archipel::Api::Internal::Api
32
32
  def info jid
33
33
  out = method_missing :info, jid
34
34
  resp = out['query'][0]['info'][0]
35
- pp resp
36
35
  VmInfo.new resp['state'], resp['autostart'],
37
36
  resp['memory'], resp['maxMem'],
38
37
  resp['cpuPrct'], resp['nrVirtCpu']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archipel-api
3
3
  version: !ruby/object:Gem::Version
4
- version: '4'
4
+ version: '5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Nowak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-17 00:00:00.000000000 Z
11
+ date: 2014-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: xml-simple
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.14'
111
+ - !ruby/object:Gem::Dependency
112
+ name: codeclimate-test-reporter
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  description: Ruby API for Archipel Agent, an XMPP-based orchestrator. See http://archipelproject.org/.
112
126
  email:
113
127
  - damian.nowak@pacmanvps.com