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

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
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
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.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: