fog-openstack 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/Rakefile +25 -15
  4. data/{lib/fog/openstack/docs → docs}/compute.md +0 -0
  5. data/{lib/fog/openstack/docs → docs}/getting_started.md +0 -0
  6. data/{lib/fog/openstack/docs → docs}/introspection.md +0 -0
  7. data/{lib/fog/openstack/docs → docs}/metering.md +0 -0
  8. data/{lib/fog/openstack/docs → docs}/network.md +0 -0
  9. data/{lib/fog/openstack/docs → docs}/nfv.md +0 -0
  10. data/{lib/fog/openstack/docs → docs}/orchestration.md +0 -0
  11. data/{lib/fog/openstack/docs → docs}/planning.md +0 -0
  12. data/{lib/fog/openstack/docs → docs}/storage.md +0 -0
  13. data/{lib/fog/openstack/examples → examples}/compute/basics.rb +0 -0
  14. data/{lib/fog/openstack/examples → examples}/compute/block_device_mapping_v2.rb +0 -0
  15. data/{lib/fog/openstack/examples → examples}/identity/basics.rb +0 -0
  16. data/{lib/fog/openstack/examples → examples}/image/upload-test-image.rb +0 -0
  17. data/{lib/fog/openstack/examples → examples}/introspection/basics.rb +0 -0
  18. data/{lib/fog/openstack/examples → examples}/network/network_add_port.rb +0 -0
  19. data/{lib/fog/openstack/examples → examples}/network/network_rbac.rb +0 -0
  20. data/{lib/fog/openstack/examples → examples}/network/network_subnets_routers.rb +0 -0
  21. data/{lib/fog/openstack/examples → examples}/planning/basics.rb +0 -0
  22. data/{lib/fog/openstack/examples → examples}/storage/set-account-quota.rb +0 -0
  23. data/fog-openstack.gemspec +1 -1
  24. data/lib/fog/openstack.rb +6 -0
  25. data/lib/fog/openstack/models/compute/aggregate.rb +3 -2
  26. data/lib/fog/openstack/models/monitoring/alarm.rb +48 -0
  27. data/lib/fog/openstack/models/monitoring/alarm_count.rb +17 -0
  28. data/lib/fog/openstack/models/monitoring/alarm_counts.rb +16 -0
  29. data/lib/fog/openstack/models/monitoring/alarm_definition.rb +56 -0
  30. data/lib/fog/openstack/models/monitoring/alarm_definitions.rb +42 -0
  31. data/lib/fog/openstack/models/monitoring/alarm_state.rb +32 -0
  32. data/lib/fog/openstack/models/monitoring/alarm_states.rb +20 -0
  33. data/lib/fog/openstack/models/monitoring/alarms.rb +30 -0
  34. data/lib/fog/openstack/models/monitoring/measurement.rb +20 -0
  35. data/lib/fog/openstack/models/monitoring/measurements.rb +16 -0
  36. data/lib/fog/openstack/models/monitoring/metric.rb +27 -0
  37. data/lib/fog/openstack/models/monitoring/metrics.rb +28 -0
  38. data/lib/fog/openstack/models/monitoring/notification_method.rb +40 -0
  39. data/lib/fog/openstack/models/monitoring/notification_methods.rb +38 -0
  40. data/lib/fog/openstack/models/monitoring/statistic.rb +20 -0
  41. data/lib/fog/openstack/models/monitoring/statistics.rb +16 -0
  42. data/lib/fog/openstack/monitoring.rb +116 -0
  43. data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -0
  44. data/lib/fog/openstack/requests/compute/create_aggregate.rb +1 -1
  45. data/lib/fog/openstack/requests/compute/create_server.rb +2 -2
  46. data/lib/fog/openstack/requests/compute/detach_volume.rb +1 -0
  47. data/lib/fog/openstack/requests/compute/update_aggregate.rb +1 -1
  48. data/lib/fog/openstack/requests/monitoring/create_alarm_definition.rb +19 -0
  49. data/lib/fog/openstack/requests/monitoring/create_metric.rb +29 -0
  50. data/lib/fog/openstack/requests/monitoring/create_metric_array.rb +19 -0
  51. data/lib/fog/openstack/requests/monitoring/create_notification_method.rb +19 -0
  52. data/lib/fog/openstack/requests/monitoring/delete_alarm.rb +18 -0
  53. data/lib/fog/openstack/requests/monitoring/delete_alarm_definition.rb +18 -0
  54. data/lib/fog/openstack/requests/monitoring/delete_notification_method.rb +18 -0
  55. data/lib/fog/openstack/requests/monitoring/find_measurements.rb +22 -0
  56. data/lib/fog/openstack/requests/monitoring/get_alarm.rb +22 -0
  57. data/lib/fog/openstack/requests/monitoring/get_alarm_counts.rb +22 -0
  58. data/lib/fog/openstack/requests/monitoring/get_alarm_definition.rb +18 -0
  59. data/lib/fog/openstack/requests/monitoring/get_notification_method.rb +18 -0
  60. data/lib/fog/openstack/requests/monitoring/list_alarm_definitions.rb +22 -0
  61. data/lib/fog/openstack/requests/monitoring/list_alarm_state_history_for_all_alarms.rb +22 -0
  62. data/lib/fog/openstack/requests/monitoring/list_alarm_state_history_for_specific_alarm.rb +22 -0
  63. data/lib/fog/openstack/requests/monitoring/list_alarms.rb +22 -0
  64. data/lib/fog/openstack/requests/monitoring/list_metric_names.rb +22 -0
  65. data/lib/fog/openstack/requests/monitoring/list_metrics.rb +22 -0
  66. data/lib/fog/openstack/requests/monitoring/list_notification_methods.rb +22 -0
  67. data/lib/fog/openstack/requests/monitoring/list_statistics.rb +22 -0
  68. data/lib/fog/openstack/requests/monitoring/patch_alarm.rb +19 -0
  69. data/lib/fog/openstack/requests/monitoring/patch_alarm_definition.rb +19 -0
  70. data/lib/fog/openstack/requests/monitoring/update_alarm.rb +19 -0
  71. data/lib/fog/openstack/requests/monitoring/update_alarm_definition.rb +19 -0
  72. data/lib/fog/openstack/requests/monitoring/update_notification_method.rb +19 -0
  73. data/lib/fog/openstack/version.rb +1 -1
  74. metadata +65 -42
  75. data/tests/openstack/models/identity/ec2_credential_tests.rb +0 -41
  76. data/tests/openstack/models/identity/ec2_credentials_tests.rb +0 -58
  77. data/tests/openstack/models/identity/role_tests.rb +0 -31
  78. data/tests/openstack/models/identity/roles_tests.rb +0 -21
  79. data/tests/openstack/models/identity/tenant_tests.rb +0 -33
  80. data/tests/openstack/models/identity/tenants_tests.rb +0 -31
  81. data/tests/openstack/models/identity/user_tests.rb +0 -47
  82. data/tests/openstack/models/identity/users_tests.rb +0 -46
  83. data/tests/openstack/requests/baremetal/chassis_tests.rb +0 -48
  84. data/tests/openstack/requests/baremetal/driver_tests.rb +0 -40
  85. data/tests/openstack/requests/baremetal/node_tests.rb +0 -83
  86. data/tests/openstack/requests/baremetal/port_tests.rb +0 -56
  87. data/tests/openstack/requests/identity/ec2_credentials_tests.rb +0 -41
  88. data/tests/openstack/requests/identity/helper.rb +0 -21
  89. data/tests/openstack/requests/identity/role_tests.rb +0 -48
  90. data/tests/openstack/requests/identity/tenant_tests.rb +0 -57
  91. data/tests/openstack/requests/identity/user_tests.rb +0 -46
  92. data/tests/openstack/requests/introspection/introspection_tests.rb +0 -297
  93. data/tests/openstack/requests/introspection/rules_tests.rb +0 -46
@@ -0,0 +1,19 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def create_notification_method(options)
6
+ request(
7
+ :body => Fog::JSON.encode(options),
8
+ :expects => [201, 204],
9
+ :method => 'POST',
10
+ :path => 'notification-methods'
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,18 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def delete_alarm(id)
6
+ request(
7
+ :expects => [204],
8
+ :method => 'DELETE',
9
+ :path => "alarms/#{id}"
10
+ )
11
+ end
12
+ end
13
+
14
+ class Mock
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def delete_alarm_definition(id)
6
+ request(
7
+ :expects => [204],
8
+ :method => 'DELETE',
9
+ :path => "alarm-definitions/#{id}"
10
+ )
11
+ end
12
+ end
13
+
14
+ class Mock
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def delete_notification_method(id)
6
+ request(
7
+ :expects => [204],
8
+ :method => 'DELETE',
9
+ :path => "notification-methods/#{id}"
10
+ )
11
+ end
12
+ end
13
+
14
+ class Mock
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def find_measurements(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "metrics/measurements",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_measurements(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def get_alarm(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarms/#{id}",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def get_alarm(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def get_alarm_counts(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarms/count",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def get_alarm_counts(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def get_alarm_definition(id)
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarm-definitions/#{id}"
10
+ )
11
+ end
12
+ end
13
+
14
+ class Mock
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def get_notification_method(id)
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "notification-methods/#{id}"
10
+ )
11
+ end
12
+ end
13
+
14
+ class Mock
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_alarm_definitions(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarm-definitions",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_metrics(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_alarm_state_history_for_all_alarms(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarms/state-history",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_alarm_state_history(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_alarm_state_history_for_specific_alarm(id, options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarms/#{id}/state-history",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_alarm_state_history(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_alarms(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "alarms",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_alarms(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_metric_names(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "metrics/names",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_metrics(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_metrics(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "metrics",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_metrics(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_notification_methods(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "notification-methods",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_metrics(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def list_statistics(options = {})
6
+ request(
7
+ :expects => [200],
8
+ :method => 'GET',
9
+ :path => "metrics/statistics",
10
+ :query => options
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ # def list_statistics(options = {})
17
+ #
18
+ # end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,19 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def patch_alarm(id, options)
6
+ request(
7
+ :expects => [200],
8
+ :method => 'PATCH',
9
+ :path => "alarms/#{id}",
10
+ :body => Fog::JSON.encode(options)
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def patch_alarm_definition(id, alarm_definition)
6
+ request(
7
+ :expects => [200],
8
+ :method => 'PATCH',
9
+ :path => "alarm-definitions/#{id}",
10
+ :body => Fog::JSON.encode(alarm_definition)
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Fog
2
+ module Monitoring
3
+ class OpenStack
4
+ class Real
5
+ def update_alarm(id, options)
6
+ request(
7
+ :expects => [200],
8
+ :method => 'PUT',
9
+ :path => "alarms/#{id}",
10
+ :body => Fog::JSON.encode(options)
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ end
17
+ end
18
+ end
19
+ end