Class: IControl::System::ConfigSync

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/system/config_sync.rb,
lib/icontrol/system.rb

Overview

The ConfigSync interface enables you to work with configuration files. For example, use the ConfigSync interface to retrieve a configuration file list, roll up and save a specified configuration, install a configuration on a device, synchronize configuration setups, roll back a configuration, and upload or download a configuration.

Defined Under Namespace

Classes: ConfigExcludeComponent, ConfigExcludeComponentSequence, ConfigFileEntry, ConfigFileSequence, ConfigIncludeComponent, ConfigIncludeComponentSequence, FileTransferContext, LoadMode, SaveMode, SyncMode

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

- (ConfigFileEntry) configuration_list

Gets a list of all available configuration archives on the 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.



90
91
92
# File 'lib/icontrol/system/config_sync.rb', line 90

def configuration_list
  super
end

- (Object) delete_configuration

Deletes this configuration from the archive directory. If this file doesn't exist, an exception will be raised. The specified configuration should not contain any path information since it is restricted to be in the archive directory. NOTE: File names containing the following characters will be considered invalid: ` ~ / \ : ; * ? " < > | &

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.



35
36
37
# File 'lib/icontrol/system/config_sync.rb', line 35

def delete_configuration
  super
end

- (Object) delete_file

Deletes this file from the device. If this file doesn't exist, an exception will be raised. NOTE: File names containing the following characters will be considered invalid: ` ~ \ : ; * ? " < > | &

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.



47
48
49
# File 'lib/icontrol/system/config_sync.rb', line 47

def delete_file
  super
end

- (FileTransferContext) download_configuration(opts)

Downloads the configurations from the device.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :config_name (String)

    The name of the configuration file to be retrieved from the device. Length limit: 255. The configuration name should not include any path information, since it will be retrieved automatically from a designated directory.

  • :chunk_size (long)

    The chunk/block size of the file data to read from the device.

  • :file_offset (long)

    The file offset that indicates where to read the next chunk of file data from.

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.



62
63
64
65
# File 'lib/icontrol/system/config_sync.rb', line 62

def download_configuration(opts)
  check_params(opts,[:config_name,:chunk_size,:file_offset])
  super
end

- (FileTransferContext) download_file(opts)

A generic file download mechanism to download a file from the device.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :file_name (String)

    The name of the file to be retrieved from the device. Length limit: 255.

  • :chunk_size (long)

    The chunk/block size of the file data to read from the device.

  • :file_offset (long)

    The file offset that indicates where to read the next chunk of file data from.

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/system/config_sync.rb', line 78

def download_file(opts)
  check_params(opts,[:file_name,:chunk_size,:file_offset])
  super
end

- (Object) install_all_configuration

Installs the configurations contained in this archive to the local device using the 'all' flag.

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.



109
110
111
# File 'lib/icontrol/system/config_sync.rb', line 109

def install_all_configuration
  super
end

- (Object) install_all_encrypted_configuration(opts)

Installs the encrypted configurations contained in this archive to the local device using the 'all' flag. If this archive is not already encrypted, then the passphrase is ignored, and installation will take place as normal.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :passphrase (String)

    The passphrase used to decrypt the archive so we can install it.

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.



123
124
125
126
# File 'lib/icontrol/system/config_sync.rb', line 123

def install_all_encrypted_configuration(opts)
  check_params(opts,[:passphrase])
  super
end

- (Object) install_configuration

Installs the configurations contained in this archive to the local device.

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
# File 'lib/icontrol/system/config_sync.rb', line 134

def install_configuration
  super
end

- (Object) install_encrypted_configuration(opts)

Installs the encrypted configurations contained in this archive to the local device. If this archive is not already encrypted, then the passphrase is ignored, and installation will take place as normal.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :passphrase (String)

    The passphrase used to decrypt the archive so we can install it.

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/system/config_sync.rb', line 148

def install_encrypted_configuration(opts)
  check_params(opts,[:passphrase])
  super
end

- (Object) load_configuration(opts)

Load this configuration. If this configuration in "filenam" is empty, then by default, /config/bigip.conf will be loaded if the "load_flag" is LOAD_HIGH_LEVEL_CONFIG, and /config/bigip_base.conf will be loaded if the "load_flag" is LOAD_BASE_LEVEL_CONFIG.

Parameters:

  • opts (Hash)

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.



163
164
165
166
# File 'lib/icontrol/system/config_sync.rb', line 163

def load_configuration(opts)
  check_params(opts,[:load_flag])
  super
end

- (Object) move_file(opts)

A generic file move mechanism to move files on a device. This call does a rename of the file and will not work across filesystem boundaries.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :from_path (String)

    The full path of the file to be moved.

  • :to_path (String)

    The full path for the file to moved to.

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.



178
179
180
181
# File 'lib/icontrol/system/config_sync.rb', line 178

def move_file(opts)
  check_params(opts,[:from_path,:to_path])
  super
end

- (Object) rollback_configuration

Rolls back to the previous configuration.

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.



189
190
191
# File 'lib/icontrol/system/config_sync.rb', line 189

def rollback_configuration
  super
end

- (Object) save_configuration(opts)

Saves the current configurations to this archive. If the "save_flag" is either SAVE_HIGH_LEVEL_CONFIG or SAVE_BASE_LEVEL_CONFIG, this filenam will be ignored, since by default, configuration will be saved into /config/bigip.conf or /config/bigip_base.conf respectively.

Parameters:

  • opts (Hash)

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.



204
205
206
207
# File 'lib/icontrol/system/config_sync.rb', line 204

def save_configuration(opts)
  check_params(opts,[:save_flag])
  super
end

- (Object) save_encrypted_configuration(opts)

Saves and encrypts the current configurations to this archive. This method is used to save whole configuration archive, not just what's in bigip.conf or bigip_base.conf.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :passphrase (String)

    The passphrase used to encrypt the saved archive.

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.



218
219
220
221
# File 'lib/icontrol/system/config_sync.rb', line 218

def save_encrypted_configuration(opts)
  check_params(opts,[:passphrase])
  super
end

- (Object) save_partial_configuration(opts)

Saves the current configurations to this archive. If the "save_flag" is either SAVE_HIGH_LEVEL_CONFIG or SAVE_BASE_LEVEL_CONFIG, this filenam will be ignored, since by default, configuration will be saved into /config/bigip.conf or /config/bigip_base.conf respectively. If any "features_to_exclude" components are specified, those components are excluded from the configuration. If any "features_to_include" components are specified, those components are included from the configuration. Note that feature inclusion/exclusion will only work when the save flag is "SAVE_FULL".

Parameters:

  • opts (Hash)

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.



239
240
241
242
# File 'lib/icontrol/system/config_sync.rb', line 239

def save_partial_configuration(opts)
  check_params(opts,[:save_flag,:features_to_exclude,:features_to_include])
  super
end

- (Object) save_partial_encrypted_configuration(opts)

Saves and encrypts the current configurations to this archive. This method is used to save whole configuration archive, not just what's in bigip.conf or bigip_base.conf. If any "features_to_exclude" components are specified, those components are excluded from the configuration. If any "features_to_include" components are specified, those components are included from the configuration. Note that feature inclusion/exclusion will only work when the save flag is "SAVE_FULL".

Parameters:

  • opts (Hash)

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.



259
260
261
262
# File 'lib/icontrol/system/config_sync.rb', line 259

def save_partial_encrypted_configuration(opts)
  check_params(opts,[:passphrase,:features_to_exclude,:features_to_include])
  super
end

- (Object) synchronize_configuration(opts)

Synchronizes the configurations between the two devices in a redundant system. In the case of cache devices, synchronizes the configurations across the cluster.

Parameters:

  • opts (Hash)

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.



273
274
275
276
# File 'lib/icontrol/system/config_sync.rb', line 273

def synchronize_configuration(opts)
  check_params(opts,[:sync_flag])
  super
end

- (Object) upload_configuration(opts)

Uploads the configurations to the device.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :config_name (String)

    The name of the configuration archive to be saved on the device. Length limit: 255. The configuration name should not include any path information, since it will be saved automatically to a designated directory. The file chunk size is implicitly known by calculating the length of the contents of the configuration data ( see file_data parameter) being uploaded.

  • :file_context (IControl::System::ConfigSync::FileTransferContext)

    The context of the transfer operation.

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.



287
288
289
290
# File 'lib/icontrol/system/config_sync.rb', line 287

def upload_configuration(opts)
  check_params(opts,[:config_name,:file_context])
  super
end

- (Object) upload_file(opts)

A generic file upload mechanism to transfer a file to the device.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :file_name (String)

    The name of the file to be saved on the device. Length limit: 255. The file chunk size is implicitly known by calculating the length of the contents of the file data ( see file_data parameter) being uploaded.

  • :file_context (IControl::System::ConfigSync::FileTransferContext)

    The context of the transfer operation.

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.



301
302
303
304
# File 'lib/icontrol/system/config_sync.rb', line 301

def upload_file(opts)
  check_params(opts,[:file_name,:file_context])
  super
end

- (String) version

Gets the version information for this interface.

Returns:

  • (String)


98
99
100
# File 'lib/icontrol/system/config_sync.rb', line 98

def version
  super
end