'Simple cellsv2 setup.
This simplified command is for use by existing non-cells users to
configure the default environment. If you are using CellsV1, this
will not work for you. Returns 0 if setup is completed (or has
already been done), 1 if no hosts are reporting (and this cannot
be mapped) and 2 if run in a CellsV1 environment.'

@args('--transport-url', metavar='<transport_url>', dest='transport_url', help='The    transport    url    for    the    cell    message    queue')
def simple_cell_setup(self, transport_url=None):

    if CONF.cells.enable:
        print('CellsV1    users    cannot    use    this    simplified    setup    command')
        return 2
    transport_url = self._validate_transport_url(transport_url)
    if (not transport_url):
        return 1
    ctxt = context.RequestContext()
    try:
        cell0_mapping = self._map_cell0()
    except db_exc.DBDuplicateEntry:
        print(_('Cell0    is    already    setup'))
        cell0_mapping = objects.CellMapping.get_by_uuid(ctxt, objects.CellMapping.CELL0_UUID)
    with context.target_cell(ctxt, cell0_mapping) as cctxt:
        try:
            migration.db_sync(None, context=cctxt)
        except db_exc.DBError as ex:
            print((_('Unable    to    sync    cell0    schema:    %s') % ex))
    cell_uuid = self._map_cell_and_hosts(transport_url)
    if (cell_uuid is None):
        return 1
    self.map_instances(cell_uuid)
    return 0
