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.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Rakefile +25 -15
- data/{lib/fog/openstack/docs → docs}/compute.md +0 -0
- data/{lib/fog/openstack/docs → docs}/getting_started.md +0 -0
- data/{lib/fog/openstack/docs → docs}/introspection.md +0 -0
- data/{lib/fog/openstack/docs → docs}/metering.md +0 -0
- data/{lib/fog/openstack/docs → docs}/network.md +0 -0
- data/{lib/fog/openstack/docs → docs}/nfv.md +0 -0
- data/{lib/fog/openstack/docs → docs}/orchestration.md +0 -0
- data/{lib/fog/openstack/docs → docs}/planning.md +0 -0
- data/{lib/fog/openstack/docs → docs}/storage.md +0 -0
- data/{lib/fog/openstack/examples → examples}/compute/basics.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/compute/block_device_mapping_v2.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/identity/basics.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/image/upload-test-image.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/introspection/basics.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/network/network_add_port.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/network/network_rbac.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/network/network_subnets_routers.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/planning/basics.rb +0 -0
- data/{lib/fog/openstack/examples → examples}/storage/set-account-quota.rb +0 -0
- data/fog-openstack.gemspec +1 -1
- data/lib/fog/openstack.rb +6 -0
- data/lib/fog/openstack/models/compute/aggregate.rb +3 -2
- data/lib/fog/openstack/models/monitoring/alarm.rb +48 -0
- data/lib/fog/openstack/models/monitoring/alarm_count.rb +17 -0
- data/lib/fog/openstack/models/monitoring/alarm_counts.rb +16 -0
- data/lib/fog/openstack/models/monitoring/alarm_definition.rb +56 -0
- data/lib/fog/openstack/models/monitoring/alarm_definitions.rb +42 -0
- data/lib/fog/openstack/models/monitoring/alarm_state.rb +32 -0
- data/lib/fog/openstack/models/monitoring/alarm_states.rb +20 -0
- data/lib/fog/openstack/models/monitoring/alarms.rb +30 -0
- data/lib/fog/openstack/models/monitoring/measurement.rb +20 -0
- data/lib/fog/openstack/models/monitoring/measurements.rb +16 -0
- data/lib/fog/openstack/models/monitoring/metric.rb +27 -0
- data/lib/fog/openstack/models/monitoring/metrics.rb +28 -0
- data/lib/fog/openstack/models/monitoring/notification_method.rb +40 -0
- data/lib/fog/openstack/models/monitoring/notification_methods.rb +38 -0
- data/lib/fog/openstack/models/monitoring/statistic.rb +20 -0
- data/lib/fog/openstack/models/monitoring/statistics.rb +16 -0
- data/lib/fog/openstack/monitoring.rb +116 -0
- data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -0
- data/lib/fog/openstack/requests/compute/create_aggregate.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +2 -2
- data/lib/fog/openstack/requests/compute/detach_volume.rb +1 -0
- data/lib/fog/openstack/requests/compute/update_aggregate.rb +1 -1
- data/lib/fog/openstack/requests/monitoring/create_alarm_definition.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/create_metric.rb +29 -0
- data/lib/fog/openstack/requests/monitoring/create_metric_array.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/create_notification_method.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/delete_alarm.rb +18 -0
- data/lib/fog/openstack/requests/monitoring/delete_alarm_definition.rb +18 -0
- data/lib/fog/openstack/requests/monitoring/delete_notification_method.rb +18 -0
- data/lib/fog/openstack/requests/monitoring/find_measurements.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/get_alarm.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/get_alarm_counts.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/get_alarm_definition.rb +18 -0
- data/lib/fog/openstack/requests/monitoring/get_notification_method.rb +18 -0
- data/lib/fog/openstack/requests/monitoring/list_alarm_definitions.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_alarm_state_history_for_all_alarms.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_alarm_state_history_for_specific_alarm.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_alarms.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_metric_names.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_metrics.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_notification_methods.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/list_statistics.rb +22 -0
- data/lib/fog/openstack/requests/monitoring/patch_alarm.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/patch_alarm_definition.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/update_alarm.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/update_alarm_definition.rb +19 -0
- data/lib/fog/openstack/requests/monitoring/update_notification_method.rb +19 -0
- data/lib/fog/openstack/version.rb +1 -1
- metadata +65 -42
- data/tests/openstack/models/identity/ec2_credential_tests.rb +0 -41
- data/tests/openstack/models/identity/ec2_credentials_tests.rb +0 -58
- data/tests/openstack/models/identity/role_tests.rb +0 -31
- data/tests/openstack/models/identity/roles_tests.rb +0 -21
- data/tests/openstack/models/identity/tenant_tests.rb +0 -33
- data/tests/openstack/models/identity/tenants_tests.rb +0 -31
- data/tests/openstack/models/identity/user_tests.rb +0 -47
- data/tests/openstack/models/identity/users_tests.rb +0 -46
- data/tests/openstack/requests/baremetal/chassis_tests.rb +0 -48
- data/tests/openstack/requests/baremetal/driver_tests.rb +0 -40
- data/tests/openstack/requests/baremetal/node_tests.rb +0 -83
- data/tests/openstack/requests/baremetal/port_tests.rb +0 -56
- data/tests/openstack/requests/identity/ec2_credentials_tests.rb +0 -41
- data/tests/openstack/requests/identity/helper.rb +0 -21
- data/tests/openstack/requests/identity/role_tests.rb +0 -48
- data/tests/openstack/requests/identity/tenant_tests.rb +0 -57
- data/tests/openstack/requests/identity/user_tests.rb +0 -46
- data/tests/openstack/requests/introspection/introspection_tests.rb +0 -297
- 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_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
|