コード例 #1
0
ファイル: rbd-target-gw.py プロジェクト: swipswaps/ceph-iscsi
def get_tpgs():
    """
    determine the number of tpgs in the current LIO environment
    :return: count of the defined tpgs
    """

    return len([tpg.tag for tpg in RTSRoot().tpgs])
コード例 #2
0
def migrate_gateway(pool_name):
    log.info("Migrating iSCSI gateway")
    lio_root = RTSRoot()
    validate(lio_root)
    generate_config(lio_root, pool_name)
    delete_disabled_acls(lio_root)
    log.info("Migration iSCSI gateway done")
    return True
コード例 #3
0
    def __init__(self, *args, **kwargs):
        BaseCollector.__init__(self, *args, **kwargs)

        # Since the module can be imported by a parent class but not
        # instantiated, the rtslib import is deferred until the first instance
        # of the the class is created. This keeps the parent module simple
        # and more importantly generic
        if 'rtslib_fb.root' not in sys.modules.keys():

            try:
                from rtslib_fb.root import RTSRoot
            except ImportError:
                raise

        self._root = RTSRoot()

        self.clients = {}
        self.cycle = 0

        self.iops = 0
        self.read_bytes_per_sec = 0
        self.write_bytes_per_sec = 0
        self.total_bytes_per_sec = 0
コード例 #4
0
ファイル: metrics.py プロジェクト: wwdillingham/ceph-iscsi
    def __init__(self):
        self.metrics = {}
        self._root = RTSRoot()

        # use utils.this_host
        self.gw_name = this_host()
コード例 #5
0
def main(logger, pool_name):
    lio_root = RTSRoot()
    validate(lio_root)
    generate_config(lio_root, pool_name, logger)
    delete_disabled_acls(lio_root, logger)