Пример #1
0
 def __init__(self, ext_mgr):
     self.volume_api = cinder_volume.API()
     self.consistencygroup_api = consistencygroupAPI.API()
     self.ext_mgr = ext_mgr
     super(VolumeController, self).__init__()
Пример #2
0
 def __init__(self, ext_mgr):
     self.volume_api = cinder_volume.API()
     self.ext_mgr = ext_mgr
     super(VolumeController, self).__init__()
Пример #3
0
 def __init__(self, *args, **kwargs):
     super(VolumeActionsController, self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
Пример #4
0
 def __init__(self, *args, **kwargs):
     super(VolumeImageMetadataController, self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
Пример #5
0
    return (backend, host, None)


def register_opts():
    cfg.CONF.register_cli_opt(cfg.StrOpt('volume-id'))


if __name__ == '__main__':

    # register a new cli opt
    register_opts()
    init_app()

    ctx = context.get_admin_context()
    volume_obj = objects.Volume.get_by_id(ctx, cfg.CONF.volume_id)

    volume_api = cinder_volume.API()
    rpc_api = rpcapi.VolumeAPI()
    for i in range(10):
        try:
            # volumes = volume_api.get_all(ctx, filters={"all_tenants": True, "status": "creating"})
            # volume_objs = objects.VolumeList.get_all(
            #     ctx, filters={"host": "cinder-volume-worker@FC_std_fnw#JT-FHX-NW-STR01", "status": "creating"}
            #
            # )
            # print(len(volume_objs))
            cctx = rpc_api._get_cctxt(volume_obj.service_topic_queue)
            cctx.call(ctx, "sjt_test_api")
        except Exception as e:
            print(e)
Пример #6
0
 def __init__(self):
     self.volume_api = volume.API()
     super(Controller, self).__init__()
Пример #7
0
 def __init__(self, ext_mgr=None):
     self.volume_api = volume.API()
     self.ext_mgr = ext_mgr
     super(SnapshotsController, self).__init__()
Пример #8
0
 def __init__(self, *args, **kwargs):
     super(AdminController, self).__init__(*args, **kwargs)
     # singular name of the resource
     self.resource_name = self.collection.rstrip('s')
     self.volume_api = volume.API()
     self.backup_api = backup.API()
Пример #9
0
 def __init__(self, *args, **kwargs):
     super(VolumeReplicationController, self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
     self.replication_api = replicationAPI.API()
Пример #10
0
 def __init__(self, *args, **kwargs):
     super(VolumeManageController, self).__init__(*args, **kwargs)
     self.volume_api = cinder_volume.API()
     self._list_manageable_view = list_manageable_view.ViewBuilder()
Пример #11
0
 def __init__(self, *args, **kwargs):
     super(VolumeTenantAttributeController, self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
Пример #12
0
 def __init__(self):
     self.backup_api = backupAPI.API()
     self.volume_api = volumeAPI.API()
     super(BackupsController, self).__init__()
Пример #13
0
 def __init__(self, *args, **kwargs):
     super(ExtendedSnapshotAttributesController,
           self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
Пример #14
0
 def __init__(self, *args, **kwargs):
     super(SnapshotExportActionsController, self).__init__(*args, **kwargs)
     self.volume_api = volume.API()
     LOG.debug("SnapshotActionsController initialized")