Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OSDDeviceClassOutput ¶ added in v1.6.6
OSDDeviceClassOutput returns JSON output from 'ceph osd crush get-device-class' that can be used for unit tests. osdId is a osd ID to get from crush map. If ID is empty raise a fake error.
func OsdLsOutput ¶
OsdLsOutput returns JSON output from 'ceph osd ls' that can be used for unit tests. It returns output for a Ceph cluster with the number of OSDs given as input starting with ID 0. example: numOSDs = 5 => return: "[0,1,2,3,4]"
func OsdOkToStopOutput ¶
OsdOkToStopOutput returns JSON output from 'ceph osd ok-to-stop' that can be used for unit tests. queriedID should be given as the ID sent to the 'osd ok-to-stop <id> [--max=N]' command. It will be returned with relevant NOT ok-to-stop results. If returnOsdIds is empty, this returns a NOT ok-to-stop result. Otherwise, it returns an ok-to-stop result. returnOsdIds should include queriedID if the result should be successful.
func OsdTreeOutput ¶
OsdTreeOutput returns JSON output from 'ceph osd tree' that can be used for unit tests. It returns output for a Ceph cluster with the given number of nodes and the given number of OSDs per node with no complex configuration. This should work even for 0 nodes.
example: OsdTreeOutput(3, 3) // returns JSON output for the Ceph cluster below node0: node1: node2: - osd0 - osd1 - osd2 - osd3 - osd4 - osd5 - osd6 - osd7 - osd8
Types ¶
This section is empty.