Beispiel #1
0
def _pull(
    username,
    password,
    mfa_secret,
    token,
    zonename,
    org,
    profile,
    name,
    revision_number,
    environment,
    work_tree,
    dependencies=[],
    force=False,
    prefix=None,
    basepath=None,
    **kwargs,
):
    return Apis(
        gen_auth(username, password, mfa_secret, token, zonename),
        org,
        revision_number,
        environment,
        work_tree=work_tree,
    ).pull(name, force=force, prefix=prefix, basepath=basepath)
Beispiel #2
0
def _take_snapshot(
    username,
    password,
    mfa_secret,
    token,
    zonename,
    org,
    profile,
    target_directory,
    prefix,
    environments,
    apis,
    **kwargs
):
    if not isinstance(apis, set):
        apis = set(apis)
    Backups(
        gen_auth(username, password, mfa_secret, token, zonename),
        org,
        target_directory,
        prefix=prefix,
        fs_write=True,
        apis=apis,
        environments=list(environments),
    ).take_snapshot()
Beispiel #3
0
def _add_permissions_for_a_resource_to_a_user_role(username, password,
                                                   mfa_secret, token, zonename,
                                                   org, profile, name, body,
                                                   **kwargs):
    return (Userroles(
        gen_auth(username, password, mfa_secret, token, zonename), org,
        name).add_permissions_for_a_resource_to_a_user_role(body).text)
Beispiel #4
0
def _create_a_consumer_key_and_secret(username,
                                      password,
                                      mfa_secret,
                                      token,
                                      zonename,
                                      org,
                                      profile,
                                      name,
                                      developer,
                                      consumer_key=None,
                                      consumer_secret=None,
                                      key_length=32,
                                      secret_length=32,
                                      key_suffix=None,
                                      key_delimiter='-',
                                      products=[],
                                      **kwargs):
    return (Apps(gen_auth(username, password, mfa_secret, token, zonename),
                 org, name).create_a_consumer_key_and_secret(
                     developer,
                     consumer_key=consumer_key,
                     consumer_secret=consumer_secret,
                     key_length=key_length,
                     secret_length=secret_length,
                     key_suffix=key_suffix,
                     key_delimiter=key_delimiter,
                     products=products,
                 ).text)
Beispiel #5
0
def _verify_a_user_roles_permission_on_a_specific_RBAC_resource(
        username, password, mfa_secret, token, zonename, org, profile, name,
        permission, resource_path, **kwargs):
    return (Userroles(
        gen_auth(username, password, mfa_secret, token, zonename), org,
        name).verify_a_user_roles_permission_on_a_specific_RBAC_resource(
            permission, resource_path).text)
Beispiel #6
0
def _delete_a_permission_for_a_resource(username, password, mfa_secret, token,
                                        zonename, org, profile, name,
                                        permission, resource_path, **kwargs):
    return (Userroles(
        gen_auth(username, password, mfa_secret, token, zonename), org,
        name).delete_a_permission_for_a_resource(permission,
                                                 resource_path).text)
Beispiel #7
0
def _get_a_keys_value_in_an_environment_scoped_keyvaluemap(
        username, password, mfa_secret, token, zonename, org, profile, name,
        environment, entry_name, **kwargs):
    return (Keyvaluemaps(
        gen_auth(username, password, mfa_secret, token, zonename), org,
        name).get_a_keys_value_in_an_environment_scoped_keyvaluemap(
            environment, entry_name).text)
Beispiel #8
0
def _get_resource_permissions_for_a_specific_role(
    username, password, mfa_secret, token, zonename, org, profile, name, resource_path="", **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .get_resource_permissions_for_a_specific_role(resource_path=resource_path)
        .text
    )
Beispiel #9
0
def _update_all_developer_attributes(
    username, password, mfa_secret, token, zonename, org, profile, name, body, **kwargs
):
    return (
        Developers(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .update_all_developer_attributes(body)
        .text
    )
Beispiel #10
0
def _list_api_proxy_revisions(
    username, password, mfa_secret, token, zonename, org, profile, name, **kwargs
):
    return (
        Apis(gen_auth(username, password, mfa_secret, token, zonename), org)
        .list_api_proxy_revisions(name)
        .text
    )
Beispiel #11
0
def _get_information_about_a_cache(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, **kwargs
):
    return (
        Caches(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .get_information_about_a_cache(environment)
        .text
    )
Beispiel #12
0
def _clear_all_cache_entries(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, **kwargs
):
    return (
        Caches(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .clear_all_cache_entries(environment)
        .text
    )
Beispiel #13
0
def _create_a_user_role_in_an_organization(
    username, password, mfa_secret, token, zonename, org, profile, names, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, None)
        .create_a_user_role_in_an_organization(names)
        .text
    )
Beispiel #14
0
def _remove_user_membership_in_role(
    username, password, mfa_secret, token, zonename, org, profile, name, user_email, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .remove_user_membership_in_role(user_email)
        .text
    )
Beispiel #15
0
def _get_a_keystore_or_truststore(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, **kwargs
):
    return (
        Keystores(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .get_a_keystore_or_truststore(environment)
        .text
    )
Beispiel #16
0
def _update_keyvaluemap_in_an_environment(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, body, **kwargs
):
    return (
        Keyvaluemaps(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .update_keyvaluemap_in_an_environment(environment, body)
        .text
    )
Beispiel #17
0
def _delete_developer(
    username, password, mfa_secret, token, zonename, org, profile, name, **kwargs
):
    return (
        Developers(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .delete_developer()
        .text
    )
Beispiel #18
0
def _get_users_for_a_role(
    username, password, mfa_secret, token, zonename, org, profile, name, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .get_users_for_a_role()
        .text
    )
Beispiel #19
0
def _list_permissions_for_a_resource(
    username, password, mfa_secret, token, zonename, org, profile, name, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .list_permissions_for_a_resource()
        .text
    )
Beispiel #20
0
def _get_deployment_environments_for_shared_flows(username, password,
                                                  mfa_secret, token, zonename,
                                                  org, profile, name,
                                                  revision_number, **kwargs):
    return (Sharedflows(
        gen_auth(username, password, mfa_secret, token, zonename),
        org).get_deployment_environments_for_shared_flows(
            name, revision_number).text)
Beispiel #21
0
def _verify_user_role_membership(
    username, password, mfa_secret, token, zonename, org, profile, name, user_email, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .verify_user_role_membership(user_email)
        .text
    )
Beispiel #22
0
def _get_the_shared_flow_attached_to_a_flow_hook(username, password,
                                                 mfa_secret, token, zonename,
                                                 org, profile, environment,
                                                 flow_hook, **kwargs):
    return (Sharedflows(
        gen_auth(username, password, mfa_secret, token, zonename),
        org).get_the_shared_flow_attached_to_a_flow_hook(
            environment, flow_hook).text)
Beispiel #23
0
def _delete_a_cache(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, **kwargs
):
    return (
        Caches(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .delete_a_cache(environment)
        .text
    )
Beispiel #24
0
def _delete_keyvaluemap_entry_in_an_environment(username, password, mfa_secret,
                                                token, zonename, org, profile,
                                                name, environment, entry_name,
                                                **kwargs):
    return (Keyvaluemaps(
        gen_auth(username, password, mfa_secret, token, zonename), org,
        name).delete_keyvaluemap_entry_in_an_environment(
            environment, entry_name).text)
Beispiel #25
0
def _create_a_cache_in_an_environment(
    username, password, mfa_secret, token, zonename, org, profile, name, environment, body, **kwargs
):
    return (
        Caches(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .create_a_cache_in_an_environment(environment, body)
        .text
    )
Beispiel #26
0
def _get_developer_by_app(
    username, password, mfa_secret, token, zonename, org, profile, app_name, **kwargs
):
    return (
        Developers(gen_auth(username, password, mfa_secret, token, zonename), org, None)
        .get_developer_by_app(app_name)
        .text
    )
Beispiel #27
0
def _delete_api_proxy_revision(
    username, password, mfa_secret, token, zonename, org, profile, name, revision_number, **kwargs
):
    return (
        Apis(gen_auth(username, password, mfa_secret, token, zonename), org)
        .delete_api_proxy_revision(name, revision_number)
        .text
    )
Beispiel #28
0
def _add_a_user_to_a_role(
    username, password, mfa_secret, token, zonename, org, profile, name, user_email, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .add_a_user_to_a_role(user_email)
        .text
    )
Beispiel #29
0
def _delete_a_user_role(
    username, password, mfa_secret, token, zonename, org, profile, name, **kwargs
):
    return (
        Userroles(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .delete_a_user_role()
        .text
    )
Beispiel #30
0
def _set_developer_status(
    username, password, mfa_secret, token, zonename, org, profile, name, action, **kwargs
):
    return (
        Developers(gen_auth(username, password, mfa_secret, token, zonename), org, name)
        .set_developer_status(action)
        .text
    )