ironik.cli package

Submodules

ironik.cli.cli_helper module

author

Jonathan Decker

ironik.cli.cli_helper.check_and_prepare_cluster_name(name)[source]
Parameters

name (str) –

Return type

str

ironik.cli.cli_helper.ensure_rancher_user(rancher_config, rancher_session)[source]
Parameters
Return type

str

ironik.cli.cli_helper.generate_random_string(length)[source]

Generates a secure random string of the given length and returns it. :param length: Length of the random string to return, only positive integers are allowed. :type length: int :return: A random string generated with the secrets built-in library. :rtype: str

Parameters

length (int) –

Return type

str

ironik.cli.cli_helper.get_router_id_from_routers(public_network_id, routers)[source]
Parameters
  • public_network_id (str) –

  • routers (list[dict]) –

Returns

Return type

str

ironik.cli.cli_helper.handle_kubernetes_setup(openstack_credentials, openstack_config, rancher_config, rancher_session, cluster_id, subnet_id, public_network_id, router_id)[source]
Parameters
Return type

bool

ironik.cli.cli_helper.remove_all_but_alphanum_dash_from_string_and_lower(dirty_string)[source]

Removes non-alphanumeric characters from the given string except dash “-” and lowers it before returning it. This is done to make user input comply with restrictions on names in the API. :param dirty_string: A string. :type dirty_string: str :return: The string without any non alphanumeric characters except dashes and in lower case. :rtype: str

Parameters

dirty_string (str) –

Return type

str

ironik.cli.cli_helper.update_rancher_user(rancher_config, rancher_session, cluster_id)[source]
Parameters
Return type

bool

ironik.cli.cli_helper.validate_key_in_dict(key, list_dicts)[source]
Parameters
  • key (str) –

  • list_dicts (list[dict]) –

Returns

Return type

bool

ironik.cli.cli_helper.wait_for_cluster_ready(rancher_config, rancher_session, cluster_id, timeout_in_s=3600)[source]
Parameters
Return type

bool

ironik.cli.cli_helper.wait_for_nodes_ready(kubernetes_config, rancher_config, rancher_session, cluster_id, timeout_in_s=3600)[source]
Parameters
Return type

bool

ironik.cli.ironik_cli module

Command-line interface.

author

Jonathan Decker

ironik.cli.ironik_cli.print_version(context, param, value)[source]
Parameters
  • context

  • param

  • value

Returns

Module contents