Merge lp:~julian-edwards/gwacl/trunk into lp:gwacl

Proposed by Julian Edwards on 2013-07-19
Status: Merged
Approved by: Julian Edwards on 2013-07-19
Approved revision: 194
Merged at revision: 193
Proposed branch: lp:~julian-edwards/gwacl/trunk
Merge into: lp:gwacl
Diff against target: 85 lines (+81/-0)
1 file modified
rolesizes.go (+81/-0)
To merge this branch: bzr merge lp:~julian-edwards/gwacl/trunk
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve on 2013-07-19
Review via email: mp+175732@code.launchpad.net

Commit message

Add a RoleSizes struct which defines all the parameters of Roles (mem, cpu, cost etc)

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'rolesizes.go'
2--- rolesizes.go 1970-01-01 00:00:00 +0000
3+++ rolesizes.go 2013-07-19 05:39:25 +0000
4@@ -0,0 +1,81 @@
5+// Copyright 2013 Canonical Ltd. This software is licensed under the
6+// GNU Lesser General Public License version 3 (see the file COPYING).
7+
8+// Define the various role sizes and their attributes.
9+
10+package gwacl
11+
12+// RoleSize is a representation of the data available in the Azure
13+// documentation here:
14+// http://msdn.microsoft.com/en-us/library/windowsazure/dn197896.aspx and
15+// pricing from here:
16+// http://www.windowsazure.com/en-us/pricing/details/virtual-machines/
17+type RoleSize struct {
18+ Name string
19+ CpuCores uint64
20+ Mem uint64 // In MB
21+ OSDiskSpaceCloud uint64 // In GB
22+ OSDiskSpaceVirt uint64 // In GB
23+ MaxDataDisks uint64 // 1TB each
24+ Cost uint64 // US ยข (cents) per hour
25+}
26+
27+var RoleSizes = []RoleSize{
28+ {
29+ Name: "ExtraSmall",
30+ CpuCores: 1, // shared
31+ Mem: 768,
32+ OSDiskSpaceCloud: 19,
33+ OSDiskSpaceVirt: 20,
34+ MaxDataDisks: 1,
35+ Cost: 2,
36+ }, {
37+ Name: "Small",
38+ CpuCores: 1,
39+ Mem: 1792,
40+ OSDiskSpaceCloud: 224,
41+ OSDiskSpaceVirt: 70,
42+ MaxDataDisks: 2,
43+ Cost: 6,
44+ }, {
45+ Name: "Medium",
46+ CpuCores: 2,
47+ Mem: 3584,
48+ OSDiskSpaceCloud: 489,
49+ OSDiskSpaceVirt: 135,
50+ MaxDataDisks: 4,
51+ Cost: 12,
52+ }, {
53+ Name: "Large",
54+ CpuCores: 4,
55+ Mem: 7168,
56+ OSDiskSpaceCloud: 999,
57+ OSDiskSpaceVirt: 285,
58+ MaxDataDisks: 8,
59+ Cost: 24,
60+ }, {
61+ Name: "ExtraLarge",
62+ CpuCores: 8,
63+ Mem: 14336,
64+ OSDiskSpaceCloud: 2039,
65+ OSDiskSpaceVirt: 65,
66+ MaxDataDisks: 16,
67+ Cost: 48,
68+ }, {
69+ Name: "A6",
70+ CpuCores: 4,
71+ Mem: 28672,
72+ OSDiskSpaceCloud: 999,
73+ OSDiskSpaceVirt: 285,
74+ MaxDataDisks: 8,
75+ Cost: 82,
76+ }, {
77+ Name: "A7",
78+ CpuCores: 8,
79+ Mem: 57344,
80+ OSDiskSpaceCloud: 2039,
81+ OSDiskSpaceVirt: 65,
82+ MaxDataDisks: 16,
83+ Cost: 164,
84+ },
85+}

Subscribers

People subscribed via source and target branches

to all changes: