3 @qhc @s~ddlmZddlmZddlmZmZmZddlm Z m Z m Z m Z m Z ddgZGddde e eZGddde e e eZd S) )cli) exceptions)RequiredOptional RESTManager RESTObject) DeleteMixinObjectDeleteMixin RetrieveMixin SaveMixin UpdateMixinGeoNodeGeoNodeManagerc@sHeZdZejdejejddZejdejej ddZ dS)r cKs,d|j}|jjj|f|}|j|dS)a2Repair the OAuth authentication of the geo node. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabRepairError: If the server failed to perform the request z/geo_nodes/%s/repairN)get_idmanagergitlabZ http_post _update_attrs)selfkwargspathZ server_datarZ/home/ec2-user/environment/venv/lib/python3.6/dist-packages/gitlab/v4/objects/geo_nodes.pyrepairs zGeoNode.repaircKsd|j}|jjj|f|S)a]Get the status of the geo node. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the server failed to perform the request Returns: dict: The status of the geo node z/geo_nodes/%s/status)rrrZhttp_get)rrrrrrstatus#s zGeoNode.statusN) __name__ __module__ __qualname__rregister_custom_actionexc on_http_errorZGitlabRepairErrorrGitlabGetErrorrrrrrr sc@sZeZdZdZeZed dZej de j e j ddZ ej de j e j d d Zd S) r z /geo_nodesenabledurlfiles_max_capacityrepos_max_capacity)optionalcKs|jjd|S)agGet the status of all the geo nodes. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the server failed to perform the request Returns: list: The status of all the geo nodes /geo_nodes/status)r%)r http_list)rrrrrr=szGeoNodeManager.statuscKs|jjd|S)aiGet the list of failures on the current geo node. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabGetError: If the server failed to perform the request Returns: list: The list of failures /geo_nodes/current/failures)r')rr&)rrrrrcurrent_failuresNszGeoNodeManager.current_failuresN)r r!r"r#)rrr_pathr Z_obj_clsrrrrrrrrr(rrrrr 6sN)rrrrZ gitlab.baserrrZ gitlab.mixinsrrr r r __all__r r rrrrs   $