Class: IControl::ARX::FileChangeNotification

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/arx/file_change_notification.rb,
lib/icontrol/arx.rb

Overview

The FileChangeNotification Interface lets applications monitor and manage ARX file data storage activity.

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

#finish_notifications(opts) ⇒ String

Complete the file change notification session established by FileChangeNotification::start_notifications. If the caller does not call this function, the file change notification session will be automatically cleared after no requests received for an hour.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :session_id (String)

    File change notification session identifier returned by FileChangeNotification ::start_notifications.

Returns:

  • (String)


17
18
19
20
# File 'lib/icontrol/arx/file_change_notification.rb', line 17

def finish_notifications(opts)
  opts = check_params(opts,[:session_id])
  super(opts)
end

#notifications(opts) ⇒ FileChangeResponse

Retrieve file and directory changes that took place during the window of time defined by from_snapshot and to_snapshot. The caller may call this function repeatedly until there are no more file changes. When a fault occurs, the caller must discard the current session and start a new session. When the fault is not arxFaultFcnRescan or arxFaultFcnSessionRestart, the caller can resume from where they left off by providing the last received change_idx to the first get_notifications call in the new session.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :session_id (String)

    File change notification session identifier returned by FileChangeNotification ::start_notifications.

  • :count (long)

    Maximum number of file changes to be returned. (Min: 25 Max: 100)

  • :change_idx (String)

    Index from which to start request. It must be empty if this is the first call in a new session. Otherwise, it is the change_idx returned by last call.

Returns:



35
36
37
38
# File 'lib/icontrol/arx/file_change_notification.rb', line 35

def notifications(opts)
  opts = check_params(opts,[:session_id,:count,:change_idx])
  super(opts)
end

#snapshot_definition(opts) ⇒ SnapshotDefinition

Returns a list of snapshot definitions for a list of specified snapshots.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :volume (String)

    The volume name.

  • :rule (String)

    The notification rule name.

  • :snapshots (String)

    The list of snapshots.

Returns:



48
49
50
51
# File 'lib/icontrol/arx/file_change_notification.rb', line 48

def snapshot_definition(opts)
  opts = check_params(opts,[:volume,:rule,:snapshots])
  super(opts)
end

#snapshots(opts) ⇒ String

Returns a list of snapshots for a notification rule.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :volume (String)

    The volume name.

  • :rule (String)

    The notification rule name.

Returns:

  • (String)


60
61
62
63
# File 'lib/icontrol/arx/file_change_notification.rb', line 60

def snapshots(opts)
  opts = check_params(opts,[:volume,:rule])
  super(opts)
end

#start_notifications(opts) ⇒ String

Start processing file and directory changes. If the from_snapshot parameter is non-zero, then the changes that occurred between the creation time of the snapshot specified by from_snapshot and the creation time of the snapshot specified by to_snapshot will be processed. If the from_snapshot parameter is 0, then all files that exist in the snapshot specified by to_snapshot will be processed. This function creates a new file change notification session that the caller uses to get all file changes that occurred between from_snapshot and to_snapshot. The caller passes the returned session id to FileChangeNotification::get_notifications to get file changes and FileChangeNotification::finish_notifications to complete the session. In case of error, this function generates a SOAP fault.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :volume (String)

    Volume name.

  • :rule (String)

    Notification rule name.

  • :from_snapshot (long)

    Timestamp of source snapshot. If 0 is specified, the entire volume is scanned.

  • :to_snapshot (long)

    Timestamp of destination snapshot. It must be the creation time of the next consecutive snapshot after from_snapshot.

  • :all_files (boolean)

    File changes to be returned, and should be set to true.

Returns:

  • (String)


83
84
85
86
# File 'lib/icontrol/arx/file_change_notification.rb', line 83

def start_notifications(opts)
  opts = check_params(opts,[:volume,:rule,:from_snapshot,:to_snapshot,:all_files])
  super(opts)
end