def populate_master_choices(self, request, context):
    try:
        instances = api.trove.instance_list(request)
        choices = [(i.id, i.name) for i in instances if (i.status == 'ACTIVE')]
    except Exception:
        choices = []
    if choices:
        choices.insert(0, ('', _('Select instance')))
    else:
        choices.insert(0, ('', _('No instances available')))
    return choices
def populate_master_choices(self, request, context):
    try:
        instances = api.trove.instance_list(request)
        choices = [(i.id, i.name) for i in instances if (i.status == 'ACTIVE')]
    except Exception:
        choices = []
    if choices:
        choices.insert(0, (, _('Select instance')))
    else:
        choices.insert(0, (, _('No instances available')))
    return choices