ofproto-dpif: Factor parts of update_stats() out into separate functions.
[sliver-openvswitch.git] / tests / MockXenAPI.py
index f6ac22f..0c02dd5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 Nicira Networks
+# Copyright (c) 2011 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@ class XenAPI(object):
         self.network = Network()
         self.pool = Pool()
         self.VIF = VIF()
+        self.VM = VM()
 
     def login_with_password(self, unused_username, unused_password):
         pass
@@ -87,3 +88,11 @@ class VIF(Table):
 
     def __init__(self):
         Table.__init__(self, VIF.__records)
+
+class VM(Table):
+    __records = ({"uuid": "fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8",
+                  "other_config":
+                      {"nicira-vm-id": "custom vm ID"}},)
+
+    def __init__(self):
+        Table.__init__(self, VM.__records)