Skip to content

Protected Environments not supported #1130

@nastrofaction

Description

@nastrofaction

Description of the problem, including code/CLI snippet

Per API: https://docs.gitlab.com/ee/api/protected_environments.html we should be able to create protected environment but the code fails as it isn't supported

Expected Behavior

project.protectedenvironments.create({
                'name': env,
                'deploy_access_levels': [{"access_level": gitlab.MAINTAINER_ACCESS}]
            })

should create the protected environment

Actual Behavior

Doesn't work

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 59, in __getattr__
    return self.__dict__["_updated_attrs"][name]
KeyError: 'protectedenvironments'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 62, in __getattr__
    value = self.__dict__["_attrs"][name]
KeyError: 'protectedenvironments'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gitlab/base.py", line 82, in __getattr__
    return self.__dict__["_parent_attrs"][name]
KeyError: 'protectedenvironments'

Specifications

  • python-gitlab version: python-gitlab-2.3.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): gitlab.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    EEIssues related to the enterprise version of GitLabhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy