Пример #1
0
    def set_drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)
        del a['resource-name']  # remove resource name key

        mod_props, del_props = DrbdOptions.parse_opts(a, self.OBJECT_NAME)

        replies = self._linstor.resource_dfn_modify(args.resource_name,
                                                    mod_props, del_props)
        return self.handle_replies(args, replies)
Пример #2
0
    def set_drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)
        del a['name']  # remove resource group key

        mod_props, del_props = DrbdOptions.parse_opts(a, self.OBJECT_NAME)

        replies = self._linstor.resource_group_modify(args.name,
                                                      property_dict=mod_props,
                                                      delete_props=del_props)
        return self.handle_replies(args, replies)
Пример #3
0
    def set_drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)
        del a['name']  # remove resource group key
        del a['volume-nr']

        mod_props, del_props = DrbdOptions.parse_opts(a, self.OBJECT_NAME)

        replies = self._linstor.volume_group_modify(args.name, args.volume_nr,
                                                    mod_props, del_props)
        return self.handle_replies(args, replies)
Пример #4
0
    def drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)
        del a['resource-name']
        del a['node-a']
        del a['node-b']

        mod_props, del_props = DrbdOptions.parse_opts(a, self.OBJECT_NAME)

        replies = self._linstor.resource_conn_modify(args.resource_name,
                                                     args.node_a, args.node_b,
                                                     mod_props, del_props)
        return self.handle_replies(args, replies)
Пример #5
0
    def set_drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)
        del a['resource-name']  # remove resource name key
        del a['volume-nr']

        mod_props, del_props = DrbdOptions.parse_opts(a)

        replies = self._linstor.volume_dfn_modify(args.resource_name,
                                                  args.volume_nr,
                                                  set_properties=mod_props,
                                                  delete_properties=del_props)
        return self.handle_replies(args, replies)
Пример #6
0
    def cmd_controller_drbd_opts(self, args):
        a = DrbdOptions.filter_new(args)

        mod_props, del_props = DrbdOptions.parse_opts(a)

        replies = []
        for prop, val in mod_props.items():
            replies.extend(self._linstor.controller_set_prop(prop, val))

        for delkey in del_props:
            replies.extend(self._linstor.controller_del_prop(delkey))

        return self.handle_replies(args, replies)