Adds StoragePools() (#27)
* Adds StoragePools() This adds the ability to list storage pools.
This commit is contained in:
		| @@ -217,6 +217,28 @@ var testDomainStateReply = []byte{ | ||||
| 	0x00, 0x00, 0x00, 0x01, // reason | ||||
| } | ||||
|  | ||||
| var testListPoolsReply = []byte{ | ||||
| 	0x00, 0x00, 0x00, 0x40, // length | ||||
| 	0x20, 0x00, 0x80, 0x86, // program | ||||
| 	0x00, 0x00, 0x00, 0x01, // version | ||||
| 	0x00, 0x00, 0x01, 0x19, // procedure | ||||
| 	0x00, 0x00, 0x00, 0x01, // type | ||||
| 	0x00, 0x00, 0x00, 0x00, // serial | ||||
| 	0x00, 0x00, 0x00, 0x00, // status | ||||
|  | ||||
| 	0x00, 0x00, 0x00, 0x01, // pools | ||||
|  | ||||
| 	// first pool, name: "default" | ||||
| 	0x00, 0x00, 0x00, 0x07, 0x64, 0x65, 0x66, 0x61, | ||||
| 	0x75, 0x6c, 0x74, 0x00, | ||||
|  | ||||
| 	// uuid: bb30a11c084648278bba3e6b5cf1b65f | ||||
| 	0xbb, 0x30, 0xa1, 0x1c, 0x08, 0x46, 0x48, 0x27, | ||||
| 	0x8b, 0xba, 0x3e, 0x6b, 0x5c, 0xf1, 0xb6, 0x5f, | ||||
|  | ||||
| 	0x00, 0x00, 0x00, 0x01, // count | ||||
| } | ||||
|  | ||||
| var testUndefineReply = []byte{ | ||||
| 	0x00, 0x00, 0x00, 0x1c, // length | ||||
| 	0x20, 0x00, 0x80, 0x86, // program | ||||
| @@ -321,6 +343,8 @@ func (m *MockLibvirt) handleRemote(procedure uint32, conn net.Conn) { | ||||
| 		conn.Write(m.reply(testDomainResponse)) | ||||
| 	case constants.ProcConnectListAllDomains: | ||||
| 		conn.Write(m.reply(testDomainsReply)) | ||||
| 	case constants.ProcConnectListAllStoragePools: | ||||
| 		conn.Write(m.reply(testListPoolsReply)) | ||||
| 	case constants.ProcDomainGetState: | ||||
| 		conn.Write(m.reply(testDomainStateReply)) | ||||
| 	case constants.ProcDomainMigrateSetMaxSpeed: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user