Class: IControl::Management::EventSubscription

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/management/event_subscription.rb,
lib/icontrol/management.rb,
lib/icontrol/base/predeclarations.rb

Overview

The EventSubscription interface is to be used to register for system configuration change events. Events are sent using the EventNotification interface.

Defined Under Namespace

Classes: AuthenticationMode, AuthenticationModeSequence, EventType, EventTypeSequence, ObjectType, ObjectTypeSequence, SubscriptionDefinition, SubscriptionDefinitionSequence, SubscriptionDetails, SubscriptionDetailsSequence, SubscriptionStatistics, SubscriptionStatisticsSequence, SubscriptionStatus, SubscriptionStatusCode, SubscriptionStatusCodeSequence, SubscriptionStatusSequence, UserCredential, UserCredentialSequence

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IControl::Base

Instance Method Details

- (EventType) available_event_types

Retrieve a list of event types available on this system.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



53
54
55
# File 'lib/icontrol/management/event_subscription.rb', line 53

def available_event_types
  super
end

- (SubscriptionStatus) create(opts)

Create a new subscription. This takes an an input a list of subscription details, one for each subscription requested.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



41
42
43
44
# File 'lib/icontrol/management/event_subscription.rb', line 41

def create(opts)
  check_params(opts,[:sub_detail_list])
  super
end

- (String) list

Retrieve the list of configured subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



64
65
66
# File 'lib/icontrol/management/event_subscription.rb', line 64

def list
  super
end

- (SubscriptionStatus) max_timeslice(opts)

Get the maximum timeslice (in seconds) between event notifications for the list of subscription identifiers.

Options Hash (opts):

  • :max_timeslice_list (long)

    A list of maximum timeslice values corresponding to the given list of subscriptions identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



78
79
80
81
# File 'lib/icontrol/management/event_subscription.rb', line 78

def max_timeslice(opts)
  check_params(opts,[:max_timeslice_list])
  super
end

- (SubscriptionStatus) min_events_per_timeslice(opts)

Get the minimum number of events needed to trigger a notification message.

Options Hash (opts):

  • :min_events_list (long)

    A list of minimum event values corresponding to the given list of subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



92
93
94
95
# File 'lib/icontrol/management/event_subscription.rb', line 92

def min_events_per_timeslice(opts)
  check_params(opts,[:min_events_list])
  super
end

- (SubscriptionStatus) modify(opts)

Modify a list of subscriptions. This takes a list of subscription definitions representing the subscriptions that are to be modified.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



171
172
173
174
# File 'lib/icontrol/management/event_subscription.rb', line 171

def modify(opts)
  check_params(opts,[:sub_def_list])
  super
end

- (SubscriptionStatus) ping

A lightweight ping to determine the event notification service's health.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



183
184
185
# File 'lib/icontrol/management/event_subscription.rb', line 183

def ping
  super
end

- (SubscriptionStatus) query(opts)

Retrieve the subscription definitions for a list of subscription identifiers.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



196
197
198
199
# File 'lib/icontrol/management/event_subscription.rb', line 196

def query(opts)
  check_params(opts,[:sub_def_list])
  super
end

- (SubscriptionStatus) remove

Remove a list of subscriptions. This takes as input a list of subscription id's and returns a list of status structures with the associated status code for each item in the id_list.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



210
211
212
# File 'lib/icontrol/management/event_subscription.rb', line 210

def remove
  super
end

- (SubscriptionStatus) reset_statistics

Reset the statistics for the given list of subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



221
222
223
# File 'lib/icontrol/management/event_subscription.rb', line 221

def reset_statistics
  super
end

- (SubscriptionStatus) set_authentication(opts)

Set the credentials for the url's associated with the given list of subscription identifiers.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



235
236
237
238
# File 'lib/icontrol/management/event_subscription.rb', line 235

def set_authentication(opts)
  check_params(opts,[:credential_list])
  super
end

- (SubscriptionStatus) set_max_timeslice(opts)

Set the maximum timeslice (in seconds) between event notifications. This value is used to ensure that notifications are sent despite the minimum event attribute not reaching its threashold.

Options Hash (opts):

  • :max_timeslice_list (long)

    A list of maximum timeslice (in seconds) to be applied to the given subscription identifier.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



251
252
253
254
# File 'lib/icontrol/management/event_subscription.rb', line 251

def set_max_timeslice(opts)
  check_params(opts,[:max_timeslice_list])
  super
end

- (SubscriptionStatus) set_min_events_per_timeslice(opts)

Set the minimum number of events needed to trigger a notification message. This value is used to force a notification message to occur even if the max timeslice attribute is not reached yet.

Options Hash (opts):

  • :min_events_list (long)

    A list of minimum event values to be applied to the given subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



267
268
269
270
# File 'lib/icontrol/management/event_subscription.rb', line 267

def set_min_events_per_timeslice(opts)
  check_params(opts,[:min_events_list])
  super
end

- (SubscriptionStatus) set_state(opts)

Set the enabled state of a list of subscriptions identifiers

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



281
282
283
284
# File 'lib/icontrol/management/event_subscription.rb', line 281

def set_state(opts)
  check_params(opts,[:state_list])
  super
end

- (SubscriptionStatus) set_ttl(opts)

Set the time to live (ttl) in seconds for the list of subscription identifiers.

Options Hash (opts):

  • :ttl_list (long)

    A list of ttl values for the given subscription identifiers. A value of -1 indicates an infinite lifetime.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



295
296
297
298
# File 'lib/icontrol/management/event_subscription.rb', line 295

def set_ttl(opts)
  check_params(opts,[:ttl_list])
  super
end

- (SubscriptionStatus) set_url(opts)

Set the url endpoint that implements the EventNotification interface.

Options Hash (opts):

  • :url_list (String)

    The list of url's corresponding to the input list of subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



309
310
311
312
# File 'lib/icontrol/management/event_subscription.rb', line 309

def set_url(opts)
  check_params(opts,[:url_list])
  super
end

- (SubscriptionStatus) state(opts)

Get the enabled state of a list of subscription identifiers.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



106
107
108
109
# File 'lib/icontrol/management/event_subscription.rb', line 106

def state(opts)
  check_params(opts,[:state_list])
  super
end

- (SubscriptionStatus) statistics(opts)

Get the statistics for the given list of subscription identifiers.

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



120
121
122
123
# File 'lib/icontrol/management/event_subscription.rb', line 120

def statistics(opts)
  check_params(opts,[:statistics_list])
  super
end

- (SubscriptionStatus) ttl(opts)

Get the time to live (ttl) in seconds for the list of subscription identifiers.

Options Hash (opts):

  • :ttl_list (long)

    A list of ttl values associated with the given subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



134
135
136
137
# File 'lib/icontrol/management/event_subscription.rb', line 134

def ttl(opts)
  check_params(opts,[:ttl_list])
  super
end

- (SubscriptionStatus) url(opts)

Get the url endpoint that implements the EventNotification interface.

Options Hash (opts):

  • :url_list (String)

    The list of url's corresponding to the input list of subscription identifiers.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



148
149
150
151
# File 'lib/icontrol/management/event_subscription.rb', line 148

def url(opts)
  check_params(opts,[:url_list])
  super
end

- (String) version

Gets the version information for this interface.



157
158
159
# File 'lib/icontrol/management/event_subscription.rb', line 157

def version
  super
end