def create_weapon(self): ''' Adds parameters to the database ''' weapon_system = WeaponSystem( name=unicode(self.get_argument('name')), ssh_user=unicode(self.get_argument('ssh_user')), ssh_key=unicode(self.get_argument('ssh_key')), ip_address=unicode(self.get_argument('ip_address')), ssh_port=int(self.get_argument('ssh_port')), service_port=int(self.get_argument('service_port')), ) dbsession.add(weapon_system) dbsession.flush() return weapon_system