3 @qhc@sddlmZddlmZddlmZmZmZddlm Z m Z m Z m Z ddddgZ Gd ddeZGd dde eZGd dde e eZGd dde eZd S))cli) exceptions)RequiredOptional RESTManager RESTObject) CRUDMixin ListMixinObjectDeleteMixin SaveMixin DeployKeyDeployKeyManager ProjectKeyProjectKeyManagerc@s eZdZdS)r N)__name__ __module__ __qualname__rr\/home/ec2-user/environment/venv/lib/python3.6/dist-packages/gitlab/v4/objects/deploy_keys.pyr sc@seZdZdZeZdS)r z /deploy_keysN)rrr_pathr _obj_clsrrrrr sc@s eZdZdS)r N)rrrrrrrr sc@sReZdZdZeZddiZed ddZeddZ e j dde j e jd d Zd S)rz$/projects/%(project_id)s/deploy_keysZ project_ididtitlekeycan_push)requiredoptional)rkey_idcKs"d|j|f}|jj|f|dS)aXEnable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProjectDeployKeyError: If the key could not be enabled z %s/%s/enableN)pathgitlabZ http_post)selfrkwargsrrrrenable"s zProjectKeyManager.enableN)rr)r)rr)r)rrrrr rZ_from_parent_attrsrZ _create_attrsZ _update_attrsrZregister_custom_actionexcZ on_http_errorZGitlabProjectDeployKeyErrorr!rrrrrs   N)rrrr"Z gitlab.baserrrZ gitlab.mixinsrrr r __all__r r r rrrrrs