File: entities.go

package info (click to toggle)
golang-github-azure-azure-sdk-for-go 2.1.1~beta-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,596 kB
  • ctags: 7,237
  • sloc: makefile: 4
file content (80 lines) | stat: -rw-r--r-- 2,525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package affinitygroup

import (
	"encoding/xml"
)

// CreateAffinityGroupParams respresents the set of parameters required for
// creating an affinity group creation request to Azure.
//
// https://msdn.microsoft.com/en-us/library/azure/gg715317.aspx
type CreateAffinityGroupParams struct {
	XMLName     xml.Name `xml:"http://schemas.microsoft.com/windowsazure CreateAffinityGroup"`
	Name        string
	Label       string
	Description string `xml:",omitempty"`
	Location    string
}

// HostedService is a struct containing details about a hosted service that is
// part of an affinity group on Azure.
type HostedService struct {
	URL         string `xml:"Url"`
	ServiceName string
}

// StorageService is a struct containing details about a storage  service that is
// part of an affinity group on Azure.
type StorageService struct {
	URL         string `xml:"Url"`
	ServiceName string
}

// AffinityGroup respresents the properties of an affinity group on Azure.
//
// https://msdn.microsoft.com/en-us/library/azure/ee460789.aspx
type AffinityGroup struct {
	Name            string
	Label           string
	Description     string
	Location        string
	HostedServices  []HostedService
	StorageServices []StorageService
	Capabilities    []string
}

// ComputeCapabilities represents the sets of capabilities of an affinity group
// obtained from an affinity group list call to Azure.
type ComputeCapabilities struct {
	VirtualMachineRoleSizes []string
	WebWorkerRoleSizes      []string
}

// AffinityGroupListResponse represents the properties obtained for each
// affinity group listed off Azure.
//
// https://msdn.microsoft.com/en-us/library/azure/ee460797.aspx
type AffinityGroupListResponse struct {
	Name                string
	Label               string
	Description         string
	Location            string
	Capabilities        []string
	ComputeCapabilities ComputeCapabilities
}

// ListAffinityGroupsResponse contains all the affinity groups obtained from a
// call to the Azure API to list all affinity groups.
type ListAffinityGroupsResponse struct {
	AffinityGroups []AffinityGroupListResponse `xml:"AffinityGroup"`
}

// UpdateAffinityGroupParams if the set of parameters required to update an
// affinity group on Azure.
//
// https://msdn.microsoft.com/en-us/library/azure/gg715316.aspx
type UpdateAffinityGroupParams struct {
	XMLName     xml.Name `xml:"http://schemas.microsoft.com/windowsazure UpdateAffinityGroup"`
	Label       string   `xml:",omitempty"`
	Description string   `xml:",omitempty"`
}