def delete_scenario(self, scenario_id, tenant_id=None):
        '''Deletes a scenario, filtering by one or several of the tenant, uuid or name
        scenario_id is the uuid or the name if it is not a valid uuid format
        Only one scenario must mutch the filtering or an error is returned
        ''' 
        for retry_ in range(0,2):
            try:
                with self.con:
                    self.cur = self.con.cursor(mdb.cursors.DictCursor)
    
                    #scenario table
                    if af.check_valid_uuid(scenario_id):
                        where_text = "uuid='%s'" % scenario_id
                    else:
                        where_text = "name='%s'" % scenario_id
                    if not tenant_id and tenant_id != "any":
                        where_text += " AND (tenant_id='%s' OR public='True')" % tenant_id
                    self.cur.execute("SELECT * FROM scenarios WHERE "+ where_text)
                    rows = self.cur.fetchall()
                    if self.cur.rowcount==0:
                        return -HTTP_Bad_Request, "No scenario found with this criteria " + where_text
                    elif self.cur.rowcount>1:
                        return -HTTP_Bad_Request, "More than one scenario found with this criteria " + where_text
                    scenario_uuid = rows[0]["uuid"]
                    scenario_name = rows[0]["name"]
                    
                    #sce_vnfs
                    self.cur.execute("DELETE FROM scenarios WHERE uuid='" + scenario_uuid + "'")
    
                    return 1, scenario_uuid + " " + scenario_name
            except (mdb.Error, __HOLE__), e:
                print "nfvo_db.delete_scenario DB Exception %d: %s" % (e.args[0], e.args[1])
                r,c =  self.format_error(e, "delete", "instances running")
                if r!=-HTTP_Request_Timeout or retry_==1: return r,c
dataset/ETHPy150Open nfvlabs/openmano/openmano/nfvo_db.py/nfvo_db.delete_scenario