Пример #1
0
    def put_node_role_dimension(self, dimension):
        # type: (NodeRoleDimension) -> None
        """
        Put a role dimension in the active network.

        Overwrites the old dimension if one of the same name already exists.

        Individual role dimension mappings within the dimension must have a valid (java) regex.

        :param dimension: The NodeRoleDimension object for the dimension to add
        :type dimension: :class:`~pybatfish.datamodel.referencelibrary.NodeRoleDimension`
        """
        restv2helper.put_node_role_dimension(self, dimension)
Пример #2
0
    def put_node_role_dimension(self, dimension):
        # type: (NodeRoleDimension) -> None
        """
        Put a role dimension in the active network.

        Overwrites the old dimension if one of the same name already exists.

        Individual roles within the dimension must have a valid (java) regex.
        The node list within those roles, if present, is ignored by the server.

        :param dimension: The NodeRoleDimension object for the dimension to add
        :type dimension: :class:`~pybatfish.datamodel.referencelibrary.NodeRoleDimension`
        """
        if dimension.type == "AUTO":
            raise ValueError("Cannot put a dimension of type AUTO")
        restv2helper.put_node_role_dimension(self, dimension)