def add ( self , entity ) : result = self . _http_req ( 'connections' , method = 'POST' , payload = entity ) status = result [ 'status' ] if not status == 201 : raise ServiceRegistryError ( status , "Couldn't add entity" ) self . debug ( 0x01 , result ) return result [ 'decoded' ]
code python add entity function
Adds the supplied dict as a new entity
def add(self, entity):
		"""
		Adds the supplied dict as a new entity
		"""
		result = self._http_req('connections', method='POST', payload=entity)
		status = result['status']
		if not status==201:
			raise ServiceRegistryError(status,"Couldn't add entity")

		self.debug(0x01,result)
		return result['decoded']