Module Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return SubscriptLoad Call NameLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad If NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Return Assign NameStore CompareEq AttributeLoad NameLoad attr NameLoad Assign NameStore CompareEq AttributeLoad NameLoad attr NameLoad If BoolOpOr NameLoad BoolOpAnd NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Return TupleLoad AttributeLoad NameLoad attr NameLoad orelse Return TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A base64 oslo_config cfg oslo_log log oslo_logging cloudbaseinit.osutils factory osutils_factory cloudbaseinit.plugins.common base cloudbaseinit.plugins.common constants cloudbaseinit.utils crypt N/A CLEAR_TEXT_INJECTED_ONLY clear_text_injected_only N/A ALWAYS_CHANGE always N/A NEVER_CHANGE no N/A LOGON_PASSWORD_CHANGE_OPTIONS N/A CLEAR_TEXT_INJECTED_ONLY NEVER_CHANGE ALWAYS_CHANGE N/A opts N/A N/A N/A cfg BoolOpt inject_user_password default True help Set the password provided in the configuration. If False or no password is provided, a random one will be set N/A N/A cfg StrOpt first_logon_behaviour default CLEAR_TEXT_INJECTED_ONLY choices LOGON_PASSWORD_CHANGE_OPTIONS help Control the behaviour of what happens at next logon. If this option is set to `always`, then the user will be forced to change the password at next logon. If it is set to `clear_text_injected_only`, then the user will have to change the password only if the password is a clear text password, coming from the metadata. The last option is `no`, when the user is never forced to change the password. N/A CONF N/A cfg CONF N/A N/A N/A CONF register_opts opts N/A N/A N/A CONF import_opt username cloudbaseinit.plugins.common.createuser N/A LOG N/A N/A oslo_logging getLogger __name__ SetUserPasswordPlugin N/A N/A base BasePlugin N/A _encrypt_password N/A N/A self ssh_pub_key password N/A N/A N/A cm N/A N/A crypt CryptManager N/A N/A N/A cm load_ssh_rsa_public_key ssh_pub_key rsa N/A N/A enc_password N/A N/A rsa public_encrypt N/A N/A password encode N/A N/A N/A base64 b64encode enc_password N/A _get_ssh_public_key N/A N/A self service N/A N/A N/A public_keys N/A N/A service get_public_keys N/A public_keys N/A N/A N/A N/A list public_keys N/A 0 N/A _get_password N/A N/A self service shared_data N/A N/A N/A injected False N/A N/A CONF inject_user_password N/A N/A password N/A N/A service get_admin_password N/A N/A password None N/A password N/A N/A injected True N/A N/A N/A LOG warn Using admin_pass metadata user password. Consider changing it as soon as possible N/A N/A password N/A N/A shared_data get N/A constants SHARED_DATA_PASSWORD N/A N/A password injected N/A _set_metadata_password N/A N/A self password service N/A N/A N/A N/A service is_password_set N/A N/A N/A N/A LOG debug User's password already set in the instance metadata and it cannot be updated in the instance metadata N/A True N/A N/A ssh_pub_key N/A N/A self _get_ssh_public_key service N/A ssh_pub_key N/A N/A enc_password_b64 N/A N/A self _encrypt_password ssh_pub_key password N/A N/A N/A service post_password enc_password_b64 N/A N/A N/A N/A LOG info No SSH public key available for password encryption N/A True N/A _set_password N/A N/A self service osutils user_name shared_data N/A N/A N/A Change the password for the received username if it is required.

        The used password can be the one received from the metadata provider,
        if it does exist, or a random one will be generated.

        .. notes:
            This method has a different behaviour depending on the value of
            :meth:`~can_update password` if this is True the password will
            be set only if the :meth:`~is_password_changed` is also True.
         N/A N/A N/A service can_update_password N/A N/A N/A service is_password_changed N/A N/A N/A N/A LOG info Updating password is not required. N/A None N/A N/A password injected N/A N/A self _get_password service shared_data N/A N/A password N/A N/A N/A N/A LOG debug Generating a random user password N/A maximum_length N/A N/A osutils get_maximum_password_length N/A password N/A N/A osutils generate_random_password maximum_length N/A N/A N/A osutils set_user_password user_name password N/A N/A N/A self _change_logon_behaviour user_name password_injected injected N/A password N/A _change_logon_behaviour N/A N/A self username password_injected N/A False N/A N/A Post set password logic

        If the option is activated, force the user to change the
        password at next logon.
         N/A N/A N/A CONF first_logon_behaviour NEVER_CHANGE N/A N/A N/A clear_text N/A N/A CONF first_logon_behaviour CLEAR_TEXT_INJECTED_ONLY N/A always N/A N/A CONF first_logon_behaviour ALWAYS_CHANGE N/A N/A always N/A clear_text password_injected N/A N/A osutils N/A N/A osutils_factory get_os_utils N/A N/A N/A osutils change_password_next_logon username N/A execute N/A N/A self service shared_data N/A N/A N/A user_name N/A N/A shared_data get N/A constants SHARED_DATA_USERNAME N/A CONF username N/A osutils N/A N/A osutils_factory get_os_utils N/A N/A N/A osutils user_exists user_name N/A N/A password N/A N/A self _set_password service osutils user_name shared_data N/A password N/A N/A N/A N/A LOG info N/A Password succesfully updated for user %s user_name N/A N/A shared_data N/A N/A constants SHARED_DATA_PASSWORD password N/A N/A N/A service can_post_password N/A N/A N/A N/A LOG info Cannot set the password in the metadata as it is not supported by this service N/A N/A N/A N/A self _set_metadata_password password service N/A N/A service can_update_password N/A N/A N/A N/A base PLUGIN_EXECUTE_ON_NEXT_BOOT False N/A N/A N/A N/A base PLUGIN_EXECUTION_DONE False N/A N/A