func (d *MockAllocator) RemoveDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error { d.lock.Lock() defer d.lock.Unlock() clusterId := cluster.Info.Id deviceId := device.Info.Id d.clustermap[clusterId] = utils.SortedStringsDelete(d.clustermap[clusterId], deviceId) return nil }
func (c *ClusterEntry) NodeDelete(id string) { c.Info.Nodes = utils.SortedStringsDelete(c.Info.Nodes, id) }
func (c *ClusterEntry) VolumeDelete(id string) { c.Info.Volumes = utils.SortedStringsDelete(c.Info.Volumes, id) }
func (d *DeviceEntry) BrickDelete(id string) { d.Bricks = utils.SortedStringsDelete(d.Bricks, id) }
func (v *VolumeEntry) BrickDelete(id string) { v.Bricks = utils.SortedStringsDelete(v.Bricks, id) }
func (n *NodeEntry) DeviceDelete(id string) { n.Devices = utils.SortedStringsDelete(n.Devices, id) }