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

#available_event_typesEventType

Retrieve a list of event types available on this system.

Returns:

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

#create(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#listString

Retrieve the list of configured subscription identifiers.

Returns:

  • (String)

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

#max_timeslice(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :max_timeslice_list (long)

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

Returns:

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

#min_events_per_timeslice(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :min_events_list (long)

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

Returns:

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

#modify(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#pingSubscriptionStatus

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

Returns:

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

#query(opts) ⇒ SubscriptionStatus

Retrieve the subscription definitions for a list of subscription identifiers.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#removeSubscriptionStatus

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.

Returns:

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

#reset_statisticsSubscriptionStatus

Reset the statistics for the given list of subscription identifiers.

Returns:

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

#set_authentication(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#set_max_timeslice(opts) ⇒ SubscriptionStatus

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.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :max_timeslice_list (long)

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

Returns:

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

#set_min_events_per_timeslice(opts) ⇒ SubscriptionStatus

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.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :min_events_list (long)

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

Returns:

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

#set_state(opts) ⇒ SubscriptionStatus

Set the enabled state of a list of subscriptions identifiers

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#set_ttl(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :ttl_list (long)

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

Returns:

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

#set_url(opts) ⇒ SubscriptionStatus

Set the url endpoint that implements the EventNotification interface.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :url_list (String)

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

Returns:

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

#state(opts) ⇒ SubscriptionStatus

Get the enabled state of a list of subscription identifiers.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#statistics(opts) ⇒ SubscriptionStatus

Get the statistics for the given list of subscription identifiers.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

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

#ttl(opts) ⇒ SubscriptionStatus

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

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :ttl_list (long)

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

Returns:

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

#url(opts) ⇒ SubscriptionStatus

Get the url endpoint that implements the EventNotification interface.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :url_list (String)

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

Returns:

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

#versionString

Gets the version information for this interface.

Returns:

  • (String)


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

def version
  super
end