예제 #1
0
파일: api_v1.py 프로젝트: crs4/orchestrator
    def put(self, action, cloud="default"):
        """
        Assign or Release resources
        """
        data = request.get_json()

        LOG.warn("Requested %(action)s %(cloud)s data: %(data)s" % locals())
        if action == "assign":
            if request.get_json().get('emulate', False):
                # only for documenting purpose!
                response = self._assign_doc_purpose(cloud)
            else:
                response = self._assign(cloud)

        elif action == "release":
            if request.get_json().get('emulate', False):
                # only for documenting purpose!
                response = self._assign_doc_purpose(cloud)
            else:
                response = self._release(cloud)

        else:
            not_implemented()

        return jsonify(**response)
예제 #2
0
파일: api_v1.py 프로젝트: crs4/orchestrator
 def get(self, action):
     if action == 'list':
         pass
     elif action == 'status':
         pass
     else:
         not_implemented()
예제 #3
0
파일: api.py 프로젝트: crs4/orchestrator
 def options(self, *args, **kwargs):
     not_implemented()
예제 #4
0
파일: api.py 프로젝트: crs4/orchestrator
 def delete(self, *args, **kwargs):
     not_implemented()
예제 #5
0
파일: api.py 프로젝트: crs4/orchestrator
 def patch(self, *args, **kwargs):
     not_implemented()
예제 #6
0
파일: api.py 프로젝트: crs4/orchestrator
 def put(self, *args, **kwargs):
     not_implemented()