#include <migrate_keyring.h>
◆ Migrate_keyring()
Migrate_keyring::Migrate_keyring |
( |
| ) |
|
◆ ~Migrate_keyring()
Migrate_keyring::~Migrate_keyring |
( |
| ) |
|
Standard destructor.
Standard destructor to close connection handle.
◆ disable_keyring_operations()
bool Migrate_keyring::disable_keyring_operations |
( |
| ) |
|
|
private |
Disable @keyring_operations variable.
Disable variable @keyring_operations.
- Returns
- 0 Success
-
1 Failure
◆ enable_keyring_operations()
bool Migrate_keyring::enable_keyring_operations |
( |
| ) |
|
|
private |
Enable @keyring_operations variable.
Enable variable @keyring_operations.
- Returns
- 0 Success
-
1 Failure
◆ execute()
bool Migrate_keyring::execute |
( |
| ) |
|
Migrate keys from source keyring to destination keyring.
This function does the following in sequence:
- Disable access to keyring service APIs.
- Load source plugin.
- Load destination plugin.
- Fetch all keys from source plugin and upon success store in destination plugin.
- Enable access to keyring service APIs.
- Unload source plugin.
- Unload destination plugin.
NOTE: In case there is any error while fetching keys from source plugin, this function would remove all keys stored as part of fetch.
- Returns
- 0 Success
-
1 Failure
◆ fetch_and_store_keys()
bool Migrate_keyring::fetch_and_store_keys |
( |
| ) |
|
|
private |
Fetch keys from source plugin and store in destination plugin.
This function does the following in sequence:
- Initialize key iterator which will make iterator to position itself inorder to fetch a key.
- Using iterator get key ID and user name.
- Fetch the key information using key ID and user name.
- Store the fetched key into destination plugin.
- In case of errors remove keys from destination plugin.
- Returns
- 0 Success
-
1 Failure
◆ init()
bool Migrate_keyring::init |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
char * |
source_plugin, |
|
|
char * |
destination_plugin, |
|
|
char * |
user, |
|
|
char * |
host, |
|
|
char * |
password, |
|
|
char * |
socket, |
|
|
ulong |
port, |
|
|
bool |
migrate_to_component |
|
) |
| |
Initialize all needed parameters to proceed with migration process.
This function does the following:
- Read command line arguments specific to migration operation
- Get plugin_dir value.
- Get a connection handle by connecting to server.
- Parameters
-
[in] | argc | Pointer to argc of original program |
[in] | argv | Pointer to argv of original program |
[in] | source_plugin | Pointer to source plugin option |
[in] | destination_plugin | Pointer to destination plugin option |
[in] | user | User to login to server |
[in] | host | Host on which to connect to server |
[in] | password | Password used to connect to server |
[in] | socket | The socket file to use for connection |
[in] | port | Port number to use for connection |
[in] | migrate_to_component | Migrate from plugin to component destination component |
- Returns
- 0 Success
-
1 Failure
◆ load_component()
bool Migrate_keyring::load_component |
( |
| ) |
|
|
private |
Load component.
- Returns
- false Success
-
true Failure
◆ load_plugin()
Load source or destination plugin.
Load plugin.
- Parameters
-
[in] | plugin_type | Indicates what plugin to be loaded |
- Returns
- 0 Success
-
1 Failure
◆ m_argc
int Migrate_keyring::m_argc |
|
private |
◆ m_argv
char** Migrate_keyring::m_argv |
|
private |
◆ m_destination_component
◆ m_destination_plugin_handle
◆ m_destination_plugin_name
std::string Migrate_keyring::m_destination_plugin_name |
|
private |
◆ m_destination_plugin_option
std::string Migrate_keyring::m_destination_plugin_option |
|
private |
◆ m_internal_option
std::string Migrate_keyring::m_internal_option[2] |
|
private |
◆ m_migrate_to_component
bool Migrate_keyring::m_migrate_to_component |
|
private |
◆ m_source_keys
std::vector<Key_info> Migrate_keyring::m_source_keys |
|
private |
◆ m_source_plugin_handle
◆ m_source_plugin_name
std::string Migrate_keyring::m_source_plugin_name |
|
private |
◆ m_source_plugin_option
std::string Migrate_keyring::m_source_plugin_option |
|
private |
◆ mysql
MYSQL* Migrate_keyring::mysql |
|
private |
◆ server_extn
The documentation for this class was generated from the following files: