Ejemplo n.º 1
0
def _item_to_environment(iterator, item):
    """Convert a JSON environment to the native object.
    """
    return Environment.from_api_repr(item, client=iterator.client)
Ejemplo n.º 2
0
 def create_environment(self, environment_name, project=None):
     """API call: create a new environment via a POST request.
     """
     environment = Environment(client=self, name=environment_name)
     environment.create(client=self, project=project)
     return environment
Ejemplo n.º 3
0
 def get_environment(self, full_path):
     environment = Environment(client=self, full_path=full_path)
     environment.reload()
     return environment
Ejemplo n.º 4
0
 def environment(self, environment_name):
     """Factory constructor for envirionment object.
     """
     return Environment(client=self, name=environment_name)