def delete(self, transport_id): args = transport_parser.parse_args() log("transportEndpoint", "::delete got args: {0}".format(args)) response = update_transport(transport_id=transport_id, enabled=False, visible=False) return jsonify(response)
def update_transport(data): log("socketio:new_transport", "req received") log("socketio:update_transport", "id: {0}".format(data.get('TransportId'))) log("socketio:update_transport", "Enabled: {0}".format(data.get('Enabled'))) response = transport.update_transport(transport_id=data.get('TransportId'), enabled=False, visible=False) emit('transportUpdated', response, broadcast=True)
def put(self, transport_id): args = transport_parser.parse_args() log("transportEndpoint", "::put got args: {0}".format(args)) response = update_transport(transport_id=transport_id, name=args['Name'], transport_type=args['TransportType'], guid=args['Guid'], configuration=args['Configuration'], enabled=args['Enabled'], visible=args['Visible']) return jsonify(response)
def update_transport(data): log("socketio:new_transport", "req received") log("socketio:update_transport", "id: {0}".format(data.get('TransportId'))) log("socketio:update_transport", "Enabled: {0}".format(data.get('Enabled'))) response = transport.update_transport(transport_id=data.get('TransportId'), name=data.get('Name'), description=data.get('Description'), guid=data.get('Guid'), configuration=data.get('Configuration'), enabled=data.get('Enabled'), visible=data.get('Visible')) emit('transportUpdated', response, broadcast=True)