예제 #1
0
  def put(self):
    pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/"))

    if self.request.headers['Content-Type'] == "application/yaml":
      process_request(self, rapi, "add_rateplan_yaml", 
         {'tenant_id' : pathelems[1], 'service_name' : pathelems[3] })
    else:
      process_request(self, rapi, "add_rateplan_json", 
         {'tenant_id' : pathelems[1], 'service_name' : pathelems[3] })  
예제 #2
0
def index():
	
	data = request.get_data()

	data = util.convert_to_json(data)

	response = util.process_request(data, datetime.datetime.now())

	return response
예제 #3
0
 def post(self):
   process_request(self, api, "register")
예제 #4
0
 def get(self):
   pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/") )
   process_request(self, api, "get_tenant", {'tenant_id' : pathelems[1]})
예제 #5
0
 def get(self):
   process_request(self, api, "list_tenants")
예제 #6
0
 def put(self):
   pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/"))
   process_request(self, bapi, "create_bill", {'tenant_id' : pathelems[1], 'account_no' : pathelems[3]})  
예제 #7
0
 def get(self):
   pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/"))
   process_request(self, aapi, "get_account_json", {'tenant_id' : pathelems[1], 'account_no' : pathelems[3]})  
예제 #8
0
 def post(self):
   pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/"))
   process_request(self, aapi, "add_account", {'tenant_id' : pathelems[1]})  
예제 #9
0
  def get(self):

    pathelems = filter(lambda p: len(p) > 0, self.request.path.split("/"))
    process_request(self, api, "get_service", 
      {'tenant_id' : pathelems[1],  'service_name' : pathelems[3] })