destroy: Adding the ability to destroy a domain.

Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
Simarpreet Singh
2016-11-02 20:43:42 -07:00
committed by Simarpreet Singh
parent e7178e25dc
commit 693bffa997
5 changed files with 76 additions and 5 deletions

View File

@@ -215,6 +215,16 @@ var testUndefineReply = []byte{
0x00, 0x00, 0x00, 0x00, // status
}
var testDestroyReply = []byte{
0x00, 0x00, 0x00, 0x1c, // length
0x20, 0x00, 0x80, 0x86, // program
0x00, 0x00, 0x00, 0x01, // version
0x00, 0x00, 0x00, 0xea, // procedure
0x00, 0x00, 0x00, 0x01, // type
0x00, 0x00, 0x00, 0x00, // serial
0x00, 0x00, 0x00, 0x00, // status
}
var testVersionReply = []byte{
0x00, 0x00, 0x00, 0x24, // length
0x20, 0x00, 0x80, 0x86, // program
@@ -289,6 +299,8 @@ func (m *MockLibvirt) handleRemote(procedure uint32, conn net.Conn) {
conn.Write(m.reply(testMigrateReply))
case constants.ProcDomainUndefineFlags:
conn.Write(m.reply(testUndefineReply))
case constants.ProcDomainDestroyFlags:
conn.Write(m.reply(testDestroyReply))
}
}