hemlock_rest/hemlock_rest.py
def POST(self):
        """
        Performs the register action of the API.

        :return: returns the result of the action
        """
        cmd = ""
        try:
            self.data = ast.literal_eval(self.data)
            if "local" in self.fullpath:
                cmd = "hemlock register-local-system --name "+self.data['name']+" --data_type "+self.data['data_type']+" --description "+self.data['description']+" --tenant_id "+self.data['tenant_id']+" --hostname "+self.data['hostname']+" --endpoint "+self.data['endpoint']+" --poc_name "+self.data['poc_name']+" --poc_email "+self.data['poc_email']
            elif "remote" in self.fullpath:
                cmd = "hemlock register-remote-system --name "+self.data['name']+" --data_type "+self.data['data_type']+" --description "+self.data['description']+" --tenant_id "+self.data['tenant_id']+" --hostname "+self.data['hostname']+" --port "+self.data['port']+" --remote_uri "+self.data['remote_uri']+" --poc_name "+self.data['poc_name']+" --poc_email "+self.data['poc_email']
        except:
            print "failure"
        return os.popen(cmd).read()

        Performs the register action of the API.

        :return: returns the result of the action
        
Performs the register action of the API.
Performs the register action of the API .
def POST(self):
        cmd = ""
        try:
            self.data = ast.literal_eval(self.data)
            if "local" in self.fullpath:
                cmd = "hemlock register-local-system --name "+self.data['name']+" --data_type "+self.data['data_type']+" --description "+self.data['description']+" --tenant_id "+self.data['tenant_id']+" --hostname "+self.data['hostname']+" --endpoint "+self.data['endpoint']+" --poc_name "+self.data['poc_name']+" --poc_email "+self.data['poc_email']
            elif "remote" in self.fullpath:
                cmd = "hemlock register-remote-system --name "+self.data['name']+" --data_type "+self.data['data_type']+" --description "+self.data['description']+" --tenant_id "+self.data['tenant_id']+" --hostname "+self.data['hostname']+" --port "+self.data['port']+" --remote_uri "+self.data['remote_uri']+" --poc_name "+self.data['poc_name']+" --poc_email "+self.data['poc_email']
        except:
            print "failure"
        return os.popen(cmd).read()
def POST ( self ) : cmd = "" try : self . data = ast . literal_eval ( self . data ) if "local" in self . fullpath : cmd = "hemlock register-local-system --name " + self . data [ 'name' ] + " --data_type " + self . data [ 'data_type' ] + " --description " + self . data [ 'description' ] + " --tenant_id " + self . data [ 'tenant_id' ] + " --hostname " + self . data [ 'hostname' ] + " --endpoint " + self . data [ 'endpoint' ] + " --poc_name " + self . data [ 'poc_name' ] + " --poc_email " + self . data [ 'poc_email' ] elif "remote" in self . fullpath : cmd = "hemlock register-remote-system --name " + self . data [ 'name' ] + " --data_type " + self . data [ 'data_type' ] + " --description " + self . data [ 'description' ] + " --tenant_id " + self . data [ 'tenant_id' ] + " --hostname " + self . data [ 'hostname' ] + " --port " + self . data [ 'port' ] + " --remote_uri " + self . data [ 'remote_uri' ] + " --poc_name " + self . data [ 'poc_name' ] + " --poc_email " + self . data [ 'poc_email' ] except : print "failure" return os . popen ( cmd ) . read ( )
Performs the register action of the API.
Performs the register action of the API .
"""
        Performs the register action of the API.

        :return: returns the result of the action
        """
returns the result of the action
returns the result of the action
self