3 @qhcy @sddlmZddlmZmZmZddlmZm Z m Z m Z ddddgZ Gddde e eZ Gd dde eZGd dde e eZGd dde eZd S) ) exceptions)RequiredOptional RESTManager RESTObject) CreateMixin CRUDMixinObjectDeleteMixin SaveMixin GroupClusterGroupClusterManagerProjectClusterProjectClusterManagerc@s eZdZdS)r N)__name__ __module__ __qualname__rrY/home/ec2-user/environment/venv/lib/python3.6/dist-packages/gitlab/v4/objects/clusters.pyr sc@sFeZdZdZeZddiZeddd Zedd Z e j e j d dZ dS)r z/groups/%(group_id)s/clustersZgroup_ididnameplatform_kubernetes_attributesdomainenabledmanagedenvironment_scope)requiredoptionalmanagement_project_id)rcKs"d|j}tj||fd|i|S)aLCreate a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo or 'ref_name', 'stage', 'name', 'all') Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request Returns: RESTObject: A new instance of the manage object class build with the data sent by the server z%s/userpath)rrcreate)selfdatakwargsrrrrr#s zGroupClusterManager.createN)rr)rrrr)rrrrr)rrr_pathr _obj_cls_from_parent_attrsr _create_attrs _update_attrsexc on_http_errorGitlabStopErrorrrrrrr sc@s eZdZdS)r N)rrrrrrrr 9sc@sFeZdZdZeZddiZeddd Zedd Z e j e j d dZ dS)r z!/projects/%(project_id)s/clustersZ project_idrrrrrrr)rrr)rcKs"d|j}tj||fd|i|S)aLCreate a new object. Args: data (dict): Parameters to send to the server to create the resource **kwargs: Extra options to send to the server (e.g. sudo or 'ref_name', 'stage', 'name', 'all') Raises: GitlabAuthenticationError: If authentication is not correct GitlabCreateError: If the server cannot perform the request Returns: RESTObject: A new instance of the manage object class build with the data sent by the server z%s/userr)rrr)rr r!rrrrrOs zProjectClusterManager.createN)rr)rrrr)rrrrr)rrrr"r r#r$rr%r&r'r(r)rrrrrr =sN)Zgitlabrr'Z gitlab.baserrrZ gitlab.mixinsrrrr __all__r r r r rrrrs (