Beispiel #1
0
    def __init__(self, server, persistence_config=None, cinderlib_config=None,
                 node_id=None, storage_nw_ip=None, **kwargs):
        if persistence_config:
            cinderlib_config['fail_on_missing_backend'] = False
            cinderlib.setup(persistence_config=persistence_config,
                            **cinderlib_config)
            Identity.__init__(self, server, cinderlib_config)

        node_id = node_id or socket.getfqdn()
        self.node_id = types.IdResp(node_id=node_id)
        self.node_info = NodeInfo.set(node_id, storage_nw_ip)
        csi.add_NodeServicer_to_server(self, server)
Beispiel #2
0
    def __init__(self,
                 server,
                 persistence_config=None,
                 node_id=None,
                 storage_nw_ip=None,
                 **kwargs):
        if persistence_config:
            self.persistence = persistence.setup(persistence_config)
            # TODO(geguileo): Make Node only service work, which may require
            # modifications to cinderlib or faking the Backend object, since
            # all objects set the backend field on initialization.
            # cinderlib.objects.Object.setup(self.persistence, ...)

        node_id = node_id or socket.getfqdn()
        self.node_id = types.IdResp(node_id=node_id)
        self.node_info = NodeInfo.set(node_id, storage_nw_ip)
        Identity.__init__(self, server)
        csi.add_NodeServicer_to_server(self, server)