magpie.api.management.network.node.network_node_utils

Attributes

NAME_REGEX

Functions

create_associated_user_groups(→ None)

Creates an associated anonymous user and group for the newly created new_node.

update_associated_user_groups(→ None)

If the NetworkNode name has changed, update the names of the associated anonymous user and group to match.

delete_network_node(→ None)

Delete a NetworkNode and the associated anonymous user and group.

check_network_node_info(→ None)

Check that the parameters used to create a new NetworkNode or update an existing one are well-formed.

load_redirect_uris(...)

If the uris are a string type, load them as a JSON into a list and return the list.

Module Contents

magpie.api.management.network.node.network_node_utils.NAME_REGEX = '^[\\w-]+$'[source]
magpie.api.management.network.node.network_node_utils.create_associated_user_groups(new_node: magpie.models.NetworkNode, request: pyramid.request.Request) None[source]

Creates an associated anonymous user and group for the newly created new_node.

This will also create the network group (named MAGPIE_NETWORK_GROUP_NAME) if it does not yet exist.

magpie.api.management.network.node.network_node_utils.update_associated_user_groups(node: magpie.models.NetworkNode, old_node_name: magpie.typedefs.Str, request: pyramid.request.Request) None[source]

If the NetworkNode name has changed, update the names of the associated anonymous user and group to match.

magpie.api.management.network.node.network_node_utils.delete_network_node(request: pyramid.request.Request, node: magpie.typedefs.Str) None[source]

Delete a NetworkNode and the associated anonymous user and group.

magpie.api.management.network.node.network_node_utils.check_network_node_info(db_session: magpie.typedefs.Optional[magpie.typedefs.Session] = None, name: magpie.typedefs.Optional[magpie.typedefs.Str] = None, base_url: magpie.typedefs.Optional[magpie.typedefs.Str] = None, jwks_url: magpie.typedefs.Optional[magpie.typedefs.Str] = None, token_url: magpie.typedefs.Optional[magpie.typedefs.Str] = None, authorization_url: magpie.typedefs.Optional[magpie.typedefs.Str] = None, redirect_uris: magpie.typedefs.Optional[magpie.typedefs.List[magpie.typedefs.Str]] = None) None[source]

Check that the parameters used to create a new NetworkNode or update an existing one are well-formed.

magpie.api.management.network.node.network_node_utils.load_redirect_uris(uris: magpie.typedefs.JSON, request: magpie.typedefs.AnyRequestType) magpie.typedefs.List[magpie.typedefs.Str][source]

If the uris are a string type, load them as a JSON into a list and return the list.