Example #1
0
 def put(self, account_id, glb_id):
     json_body = self.get_request_body(request)
     #Object validation, error handling etc...
     glb_json = json_body.get('glb')
     glb = glbservice.GlobalLoadbalancerService() \
         .update(account_id, glb_id, glb_json)
     return jsonify({"glb": glb.to_dict()})
Example #2
0
File: nodes.py Project: crc32a/glb
    def post(self, account_id, glb_id):
        json_body = self.get_request_body(request)
        nodes_json = json_body.get('nodes')
        #monitor_json = nodes_json.get('monitor')
        #Object validation, error handling etc...

        g = glbservice.GlobalLoadbalancerService().get(account_id, glb_id)
        n = nodeservice.NodesService().create(account_id, g.id_, nodes_json)
        n = {"node": n.to_dict()}
        return jsonify(n)
Example #3
0
 def delete(self, account_id, glb_id):
     #Object validation, error handling etc...
     glb = glbservice.GlobalLoadbalancerService().delete(account_id, glb_id)
     return jsonify({"glb": glb.to_dict()})
Example #4
0
 def delete(self, account_id, glb_id):
     #Object validation, error handling etc...
     glb = glbservice.GlobalLoadbalancerService().delete(account_id, glb_id)
     return jsonify({"glb": marshal([glb.to_dict()], Mappings.GLB_FIELDS)})