install.py
def install_openwhisk_action_in_path(packaging_params, action_params_to_env, path):

    """
    This performs the equivalent of the command line:

    wsk action create fetch_aws_keys --docker tleyden5iwx/openwhisk-dockerskeleton --param AwsAccessKeyId "$AWS_ACCESS_KEY_ID" --param AwsSecretAccessKey "$AWS_SECRET_ACCESS_KEY" --param KeyNukerOrg "default"
    
    Where the param values are pulled out of environment variables.  The param vals and their
    corresponding environment variable names are specified in the action_params_to_env dictionary

    The name of the action is discovered from the path basename.
    """

    # Save the current working directory
    cwd = os.getcwd()
    
    os.chdir(path)

    openwhisk_action = os.path.basename(os.getcwd())

    if openwhisk_action not in action_params_to_env:
        os.chdir(cwd) # Restore the original current working directory
        return

    params_to_env = action_params_to_env[openwhisk_action]

    if packaging_params.dryRun is False and openwhisk_action_exists(openwhisk_action):
        delete_openwhisk_action(openwhisk_action)

    install_openwhisk_action(
        packaging_params,
        openwhisk_action,
        params_to_env,
    )

    # Restore the original current working directory
    os.chdir(cwd) 

    return openwhisk_action

    This performs the equivalent of the command line:

    wsk action create fetch_aws_keys --docker tleyden5iwx/openwhisk-dockerskeleton --param AwsAccessKeyId "$AWS_ACCESS_KEY_ID" --param AwsSecretAccessKey "$AWS_SECRET_ACCESS_KEY" --param KeyNukerOrg "default"
    
    Where the param values are pulled out of environment variables.  The param vals and their
    corresponding environment variable names are specified in the action_params_to_env dictionary

    The name of the action is discovered from the path basename.
    




The name of the action is discovered from the path basename.
The name of the action is discovered from the path basename .
def install_openwhisk_action_in_path(packaging_params, action_params_to_env, path):
    cwd = os.getcwd()
    os.chdir(path)
    openwhisk_action = os.path.basename(os.getcwd())
    if openwhisk_action not in action_params_to_env:
        os.chdir(cwd) 
        return
    params_to_env = action_params_to_env[openwhisk_action]
    if packaging_params.dryRun is False and openwhisk_action_exists(openwhisk_action):
        delete_openwhisk_action(openwhisk_action)
    install_openwhisk_action(
        packaging_params,
        openwhisk_action,
        params_to_env,
    )
    os.chdir(cwd) 
    return openwhisk_action
def install_openwhisk_action_in_path ( packaging_params , action_params_to_env , path ) : cwd = os . getcwd ( ) os . chdir ( path ) openwhisk_action = os . path . basename ( os . getcwd ( ) ) if openwhisk_action not in action_params_to_env : os . chdir ( cwd ) return params_to_env = action_params_to_env [ openwhisk_action ] if packaging_params . dryRun is False and openwhisk_action_exists ( openwhisk_action ) : delete_openwhisk_action ( openwhisk_action ) install_openwhisk_action ( packaging_params , openwhisk_action , params_to_env , ) os . chdir ( cwd ) return openwhisk_action
This performs the equivalent of the command line:
wsk action create fetch_aws_keys --docker tleyden5iwx/openwhisk-dockerskeleton --param AwsAccessKeyId "$AWS_ACCESS_KEY_ID" --param AwsSecretAccessKey "$AWS_SECRET_ACCESS_KEY" --param KeyNukerOrg "default"
This performs the equivalent of the command line : wsk action create fetch_aws_keys -- docker tleyden5iwx / openwhisk - dockerskeleton -- param AwsAccessKeyId " $AWS_ACCESS_KEY_ID " -- param AwsSecretAccessKey " $AWS_SECRET_ACCESS_KEY " -- param KeyNukerOrg " default "
"""
    This performs the equivalent of the command line:

    wsk action create fetch_aws_keys --docker tleyden5iwx/openwhisk-dockerskeleton --param AwsAccessKeyId "$AWS_ACCESS_KEY_ID" --param AwsSecretAccessKey "$AWS_SECRET_ACCESS_KEY" --param KeyNukerOrg "default"
    
    Where the param values are pulled out of environment variables.  The param vals and their
    corresponding environment variable names are specified in the action_params_to_env dictionary

    The name of the action is discovered from the path basename.
    """ # Save the current working directory # Restore the original current working directory # Restore the original current working directory
packaging_params
action_params_to_env
path