|
@ -177,7 +177,13 @@ func (dn *DataNode) GetVolumesById(id needle.VolumeId) (vInfo storage.VolumeInfo |
|
|
|
|
|
|
|
|
func (dn *DataNode) GetDataCenter() *DataCenter { |
|
|
func (dn *DataNode) GetDataCenter() *DataCenter { |
|
|
rack := dn.Parent() |
|
|
rack := dn.Parent() |
|
|
|
|
|
if rack == nil { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
dcNode := rack.Parent() |
|
|
dcNode := rack.Parent() |
|
|
|
|
|
if dcNode == nil { |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
dcValue := dcNode.GetValue() |
|
|
dcValue := dcNode.GetValue() |
|
|
return dcValue.(*DataCenter) |
|
|
return dcValue.(*DataCenter) |
|
|
} |
|
|
} |
|
|