deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [5/7] git commit: CIMI: CIMI Systems mock driver fixtures (json)
Date Mon, 22 Apr 2013 16:35:13 GMT
CIMI: CIMI Systems mock driver fixtures (json)


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/ed68a682
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/ed68a682
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/ed68a682

Branch: refs/heads/master
Commit: ed68a6828a0abb888a5417b401e65a88753c3c04
Parents: 1b26105
Author: marios <marios@redhat.com>
Authored: Mon Apr 22 19:32:39 2013 +0300
Committer: marios <marios@redhat.com>
Committed: Mon Apr 22 19:32:39 2013 +0300

----------------------------------------------------------------------
 .../drivers/mock/data/cimi/system/system1.json     |    7 +++
 .../drivers/mock/data/cimi/system/system2.json     |    3 +-
 .../data/cimi/system_machine/sys_machine_1.json    |    8 +++
 .../mock/data/cimi/system_template/template1.json  |   34 +++-----------
 .../mock/data/cimi/system_volume/sys_volume_1.json |    8 +++
 5 files changed, 33 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ed68a682/server/lib/deltacloud/drivers/mock/data/cimi/system/system1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/system/system1.json b/server/lib/deltacloud/drivers/mock/data/cimi/system/system1.json
index f921632..edff9cb 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/system/system1.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/system/system1.json
@@ -3,6 +3,13 @@
   "description": "the first system",
   "created": "Fri Feb 08 15:25:41 EET 2013",
   "state": "STOPPED",
+  "machines": { "href": "http://cimi.example.org/systems/system1/machines"},
+  "credentials": { "href": "http://cimi.example.org/systems/system1/credentials"},
+  "volumes": { "href": "http://cimi.example.org/systems/system1/volumes"},
+  "networks": { "href": "http://cimi.example.org/systems/system1/networks"},
+  "networkPorts": { "href": "http://cimi.example.org/systems/system1/network_ports"},
+  "addresses": { "href": "http://cimi.example.org/systems/system1/addresses"},
+  "forwardingGroups": { "href": "http://cimi.example.org/systems/system1/forwarding_groups"},
   "operations": [
     { "rel": "http://schemas.dmtf.org/cimi/1/action/start", "href": "http://cimi.example.org/systems/system1/start"
},
     { "rel": "edit", "href": "http://cimi.example.org/systems/system1" },

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ed68a682/server/lib/deltacloud/drivers/mock/data/cimi/system/system2.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/system/system2.json b/server/lib/deltacloud/drivers/mock/data/cimi/system/system2.json
index 208feca..ee1dff8 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/system/system2.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/system/system2.json
@@ -3,8 +3,9 @@
   "description": "the second system",
   "created": "Fri Feb 08 15:25:41 EET 2013",
   "state": "STOPPED",
+  "machines": { "href": "http://cimi.example.org/systems/system2/machines"},
   "operations": [
-    { "rel": "http://schemas.dmtf.org/cimi/1/action/start", "href": "http://cimi.example.org/systems/system1/start"
},
+    { "rel": "http://schemas.dmtf.org/cimi/1/action/start", "href": "http://cimi.example.org/systems/system2/start"
},
     { "rel": "edit", "href": "http://cimi.example.org/systems/system2" },
     { "rel": "delete", "href": "http://cimi.example.org/systems/system2" }
   ]

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ed68a682/server/lib/deltacloud/drivers/mock/data/cimi/system_machine/sys_machine_1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/system_machine/sys_machine_1.json
b/server/lib/deltacloud/drivers/mock/data/cimi/system_machine/sys_machine_1.json
new file mode 100644
index 0000000..2a480d1
--- /dev/null
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/system_machine/sys_machine_1.json
@@ -0,0 +1,8 @@
+{ "id": "http://cimi.example.org/systems/system1/machines/sys_machine_1",
+  "name": "sysmach1",
+  "created": "Fri Feb 08 12:15:15 EET 2013",
+  "machine": { "href": "http://cimi.example.org/machines/inst0" },
+  "operations": [
+    { "rel": "delete", "href": "http://cimi.example.org/systems/system1/machines/sys_machine_1"
}
+  ]
+}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ed68a682/server/lib/deltacloud/drivers/mock/data/cimi/system_template/template1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/system_template/template1.json b/server/lib/deltacloud/drivers/mock/data/cimi/system_template/template1.json
index 913252b..01d3dbe 100644
--- a/server/lib/deltacloud/drivers/mock/data/cimi/system_template/template1.json
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/system_template/template1.json
@@ -3,45 +3,27 @@
   "description": "A mock system template",
   "created": "Fri Feb 08 12:15:15 EET 2013",
   "componentDescriptors": [
-    { "name": "my machine",
+    { "name": "a_system_machine",
       "description": "an inline mock machine template",
       "type": "http://schemas.dmtf.org/cimi/1/Machine",
       "machineTemplate": {
-        "name": "machine in mock system",
-        "description": "machine in system",
         "machineConfig": { "href": "http://example.com/configs/m1-small" },
-        "machineImage": { "href": "http://example.com/images/img1" },
-        "volumeTemplates": [
-	  { "href": "http://example.com/volumes/sysvol1" }
-	]
-      }
+        "machineImage": { "href": "http://example.com/images/img1" }
+      },
+      "quantity": 2
     },
-    { "name": "my second machine",
+    { "name": "another_system_machine",
       "description": "another inline mock machine template",
       "type": "http://schemas.dmtf.org/cimi/1/Machine",
       "machineTemplate": {
-        "name": "machine in mock system",
-        "description": "machine in system",
         "machineConfig": { "href": "http://example.com/configs/m1-small" },
-        "machineImage": { "href": "http://example.com/images/img1" },
-        "volumeTemplates": [
-	  { "volumeConfig": {"capacity": 10485760} }
-	]
+        "machineImage": { "href": "http://example.com/images/img1" }
       }
     },
-    { "name": "my third machine",
+    { "name": "yet_another_system_machine",
       "description": "a reference to a mock machine template",
       "type": "http://schemas.dmtf.org/cimi/1/Machine",
-      "machineTemplate": { "href" : "http://example.com/machine_templates/template1" }
-    },
-    { "name": "my network",
-      "description": "an inline network template",
-      "type": "http://schemas.dmtf.org/cimi/1/Network",
-      "networkTemplate": {
-        "name": "network in mock system",
-        "description": "network in system",
-        "networkConfig": { "networkType": "PRIVATE", "classOfService": "GOLD" }
-      }
+      "machineTemplate": { "href" : "http://example.com/machine_templates/1" }
     }
   ],
   "operations": [

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ed68a682/server/lib/deltacloud/drivers/mock/data/cimi/system_volume/sys_volume_1.json
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/data/cimi/system_volume/sys_volume_1.json
b/server/lib/deltacloud/drivers/mock/data/cimi/system_volume/sys_volume_1.json
new file mode 100644
index 0000000..aef74df
--- /dev/null
+++ b/server/lib/deltacloud/drivers/mock/data/cimi/system_volume/sys_volume_1.json
@@ -0,0 +1,8 @@
+{ "id": "http://cimi.example.org/systems/system1/volumes/sys_volume_1",
+  "name": "sysvol1",
+  "created": "Fri Feb 08 12:15:15 EET 2013",
+  "volume": { "href": "http://cimi.example.org/volumes/vol1" },
+  "operations": [
+    { "rel": "delete", "href": "http://cimi.example.org/systems/system1/volumes/sys_volume_1"
}
+  ]
+}


Mime
View raw message