Revision af63e739
b/gen/com/rackspacecloud/android/R.java | ||
---|---|---|
12 | 12 |
} |
13 | 13 |
public static final class drawable { |
14 | 14 |
public static final int add_button=0x7f020000; |
15 |
public static final int arch_icon=0x7f020001; |
|
16 |
public static final int arch_large=0x7f020002; |
|
17 |
public static final int centos_icon=0x7f020003; |
|
18 |
public static final int centos_large=0x7f020004; |
|
19 |
public static final int cloudfiles=0x7f020005; |
|
20 |
public static final int cloudservers_icon=0x7f020006; |
|
21 |
public static final int cloudservers_large=0x7f020007; |
|
22 |
public static final int debian_icon=0x7f020008; |
|
23 |
public static final int debian_large=0x7f020009; |
|
24 |
public static final int fedora_icon=0x7f02000a; |
|
25 |
public static final int fedora_large=0x7f02000b; |
|
26 |
public static final int gentoo_icon=0x7f02000c; |
|
27 |
public static final int gentoo_large=0x7f02000d; |
|
28 |
public static final int icon=0x7f02000e; |
|
29 |
public static final int rackspace60=0x7f02000f; |
|
30 |
public static final int rackspacecloud=0x7f020010; |
|
31 |
public static final int redhat_icon=0x7f020011; |
|
32 |
public static final int redhat_large=0x7f020012; |
|
33 |
public static final int refresh_button=0x7f020013; |
|
34 |
public static final int settings_button=0x7f020014; |
|
35 |
public static final int ubuntu_icon=0x7f020015; |
|
36 |
public static final int ubuntu_large=0x7f020016; |
|
37 |
public static final int ukflag=0x7f020017; |
|
38 |
public static final int usflag=0x7f020018; |
|
39 |
public static final int windows_icon=0x7f020019; |
|
40 |
public static final int windows_large=0x7f02001a; |
|
15 |
public static final int alert_dialog_icon=0x7f020001; |
|
16 |
public static final int arch_icon=0x7f020002; |
|
17 |
public static final int arch_large=0x7f020003; |
|
18 |
public static final int centos_icon=0x7f020004; |
|
19 |
public static final int centos_large=0x7f020005; |
|
20 |
public static final int cloudfiles=0x7f020006; |
|
21 |
public static final int cloudservers_icon=0x7f020007; |
|
22 |
public static final int cloudservers_large=0x7f020008; |
|
23 |
public static final int debian_icon=0x7f020009; |
|
24 |
public static final int debian_large=0x7f02000a; |
|
25 |
public static final int fedora_icon=0x7f02000b; |
|
26 |
public static final int fedora_large=0x7f02000c; |
|
27 |
public static final int gentoo_icon=0x7f02000d; |
|
28 |
public static final int gentoo_large=0x7f02000e; |
|
29 |
public static final int icon=0x7f02000f; |
|
30 |
public static final int rackspace60=0x7f020010; |
|
31 |
public static final int rackspacecloud=0x7f020011; |
|
32 |
public static final int redhat_icon=0x7f020012; |
|
33 |
public static final int redhat_large=0x7f020013; |
|
34 |
public static final int refresh_button=0x7f020014; |
|
35 |
public static final int settings_button=0x7f020015; |
|
36 |
public static final int ubuntu_icon=0x7f020016; |
|
37 |
public static final int ubuntu_large=0x7f020017; |
|
38 |
public static final int ukflag=0x7f020018; |
|
39 |
public static final int usflag=0x7f020019; |
|
40 |
public static final int windows_icon=0x7f02001a; |
|
41 |
public static final int windows_large=0x7f02001b; |
|
41 | 42 |
} |
42 | 43 |
public static final class id { |
43 |
public static final int add_server=0x7f060023;
|
|
44 |
public static final int add_server=0x7f060021;
|
|
44 | 45 |
public static final int button=0x7f06000e; |
45 | 46 |
public static final int flavor_spinner=0x7f060002; |
46 | 47 |
public static final int icon=0x7f060006; |
... | ... | |
55 | 56 |
public static final int login_username=0x7f06000c; |
56 | 57 |
public static final int no_servers_label=0x7f060011; |
57 | 58 |
public static final int no_servers_sublabel=0x7f060012; |
58 |
public static final int refresh=0x7f060024;
|
|
59 |
public static final int refresh=0x7f060022;
|
|
59 | 60 |
public static final int save_button=0x7f060003; |
60 | 61 |
public static final int save_server_progress_bar=0x7f060004; |
61 | 62 |
public static final int saving_server_label=0x7f060005; |
... | ... | |
64 | 65 |
public static final int tab1=0x7f060014; |
65 | 66 |
public static final int tab2=0x7f060015; |
66 | 67 |
public static final int tabhost=0x7f060013; |
67 |
public static final int view_server_change_password_button=0x7f060021;
|
|
68 |
public static final int view_server_delete_button=0x7f060022;
|
|
68 |
public static final int view_server_change_password_button=0x7f06001f;
|
|
69 |
public static final int view_server_delete_button=0x7f060020;
|
|
69 | 70 |
public static final int view_server_disk=0x7f06001b; |
70 | 71 |
public static final int view_server_hard_reboot_button=0x7f06001e; |
71 | 72 |
public static final int view_server_layout=0x7f060016; |
... | ... | |
73 | 74 |
public static final int view_server_name=0x7f060018; |
74 | 75 |
public static final int view_server_os=0x7f060019; |
75 | 76 |
public static final int view_server_os_logo=0x7f060017; |
76 |
public static final int view_server_rebuild_button=0x7f060020; |
|
77 |
public static final int view_server_resize_button=0x7f06001f; |
|
78 | 77 |
public static final int view_server_soft_reboot_button=0x7f06001d; |
79 | 78 |
public static final int view_server_status=0x7f06001c; |
80 | 79 |
} |
b/main/conf/actions.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<element name="reboot" type="csapi:Reboot" /> |
|
11 |
<element name="rebuild" type="csapi:Rebuild" /> |
|
12 |
<element name="resize" type="csapi:Resize" /> |
|
13 |
<element name="confirmResize" type="csapi:ConfirmResize" /> |
|
14 |
<element name="revertResize" type="csapi:RevertResize" /> |
|
15 |
|
|
16 |
<!-- Complex Types --> |
|
17 |
|
|
18 |
<complexType abstract="true" name="Action" /> |
|
19 |
|
|
20 |
<complexType name="Reboot"> |
|
21 |
<complexContent> |
|
22 |
<extension base="csapi:Action"> |
|
23 |
<attribute name="type" type="csapi:RebootType" use="required" /> |
|
24 |
</extension> |
|
25 |
</complexContent> |
|
26 |
</complexType> |
|
27 |
|
|
28 |
<complexType name="Rebuild"> |
|
29 |
<complexContent> |
|
30 |
<extension base="csapi:Action"> |
|
31 |
<attribute name="imageId" type="xsd:int" use="required" /> |
|
32 |
</extension> |
|
33 |
</complexContent> |
|
34 |
</complexType> |
|
35 |
|
|
36 |
<complexType name="Resize"> |
|
37 |
<complexContent> |
|
38 |
<extension base="csapi:Action"> |
|
39 |
<attribute name="flavorId" type="xsd:int" use="required" /> |
|
40 |
</extension> |
|
41 |
</complexContent> |
|
42 |
</complexType> |
|
43 |
|
|
44 |
<complexType name="ConfirmResize"> |
|
45 |
<complexContent> |
|
46 |
<extension base="csapi:Action" /> |
|
47 |
</complexContent> |
|
48 |
</complexType> |
|
49 |
|
|
50 |
<complexType name="RevertResize"> |
|
51 |
<complexContent> |
|
52 |
<extension base="csapi:Action" /> |
|
53 |
</complexContent> |
|
54 |
</complexType> |
|
55 |
|
|
56 |
<!-- Simple Types --> |
|
57 |
<simpleType name="RebootType"> |
|
58 |
<restriction base="xsd:string"> |
|
59 |
<enumeration value="HARD" /> |
|
60 |
<enumeration value="SOFT" /> |
|
61 |
</restriction> |
|
62 |
</simpleType> |
|
63 |
</schema> |
|
64 |
|
b/main/conf/backup.xsd | ||
---|---|---|
1 |
<schema |
|
2 |
elementFormDefault="qualified" |
|
3 |
attributeFormDefault="unqualified" |
|
4 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
5 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
6 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
7 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
8 |
> |
|
9 |
<element name="backupSchedule" type="csapi:BackupSchedule" /> |
|
10 |
|
|
11 |
<!-- Complex Types --> |
|
12 |
<complexType name="BackupSchedule"> |
|
13 |
<attribute type="xsd:boolean" name="enabled" use="required" /> |
|
14 |
<attribute type="csapi:WeeklyBackup" name="weekly" use="required" /> |
|
15 |
<attribute type="csapi:DailyBackup" name="daily" use="required" /> |
|
16 |
</complexType> |
|
17 |
|
|
18 |
<!-- Simple Types --> |
|
19 |
<simpleType name="DailyBackup"> |
|
20 |
<restriction base="string"> |
|
21 |
<enumeration value="DISABLED" /> |
|
22 |
<enumeration value="H_0000_0200" /> |
|
23 |
<enumeration value="H_0200_0400" /> |
|
24 |
<enumeration value="H_0400_0600" /> |
|
25 |
<enumeration value="H_0600_0800" /> |
|
26 |
<enumeration value="H_0800_1000" /> |
|
27 |
<enumeration value="H_1000_1200" /> |
|
28 |
<enumeration value="H_1200_1400" /> |
|
29 |
<enumeration value="H_1400_1600" /> |
|
30 |
<enumeration value="H_1600_1800" /> |
|
31 |
<enumeration value="H_1800_2000" /> |
|
32 |
<enumeration value="H_2000_2200" /> |
|
33 |
<enumeration value="H_2200_0000" /> |
|
34 |
</restriction> |
|
35 |
</simpleType> |
|
36 |
|
|
37 |
<simpleType name="WeeklyBackup"> |
|
38 |
<restriction base="string"> |
|
39 |
<enumeration value="DISABLED" /> |
|
40 |
<enumeration value="SUNDAY" /> |
|
41 |
<enumeration value="MONDAY" /> |
|
42 |
<enumeration value="TUESDAY" /> |
|
43 |
<enumeration value="WEDNESDAY" /> |
|
44 |
<enumeration value="THURSDAY" /> |
|
45 |
<enumeration value="FRIDAY" /> |
|
46 |
<enumeration value="SATURDAY" /> |
|
47 |
<enumeration value="SUNDAY" /> |
|
48 |
</restriction> |
|
49 |
</simpleType> |
|
50 |
|
|
51 |
</schema> |
|
52 |
|
b/main/conf/cloudservers.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="servers.xsd" /> |
|
11 |
<include schemaLocation="limits.xsd" /> |
|
12 |
<include schemaLocation="version.xsd" /> |
|
13 |
<include schemaLocation="images.xsd" /> |
|
14 |
<include schemaLocation="flavors.xsd" /> |
|
15 |
<include schemaLocation="ipgroups.xsd" /> |
|
16 |
<include schemaLocation="backup.xsd" /> |
|
17 |
<include schemaLocation="actions.xsd" /> |
|
18 |
<include schemaLocation="faults.xsd" /> |
|
19 |
</schema> |
b/main/conf/common.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
|
|
11 |
<!-- Simple types that span multiple requests --> |
|
12 |
<simpleType name="Progress"> |
|
13 |
<restriction base="xsd:int"> |
|
14 |
<minInclusive value="0"/> |
|
15 |
<maxInclusive value="100" /> |
|
16 |
</restriction> |
|
17 |
</simpleType> |
|
18 |
</schema> |
|
19 |
|
b/main/conf/faults.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
7 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0"> |
|
9 |
|
|
10 |
<!-- Faults --> |
|
11 |
<element name="cloudServersFault" type="csapi:CloudServersAPIFault" /> |
|
12 |
<element name="itemNotFound" type="csapi:ItemNotFoundAPIFault" /> |
|
13 |
<element name="rescueModeInUse" type="csapi:RescueModeInUseAPIFault" /> |
|
14 |
<element name="buildInProgress" type="csapi:BuildInProgressAPIFault" /> |
|
15 |
<element name="serverCapacityUnavailable" type="csapi:ServerCapacityUnavailableAPIFault" /> |
|
16 |
<element name="backupOrResizeInProgress" type="csapi:BackupOrResizeInProgressAPIFault" /> |
|
17 |
<element name="resizeNotAllowed" type="csapi:ResizeNotAllowedAPIFault" /> |
|
18 |
<element name="serviceUnavailable" type="csapi:ServiceUnavailableAPIFault" /> |
|
19 |
<element name="unauthorized" type="csapi:UnauthorizedAPIFault" /> |
|
20 |
<element name="overLimit" type="csapi:OverLimitAPIFault" /> |
|
21 |
<element name="badRequest" type="csapi:BadRequestAPIFault" /> |
|
22 |
<element name="badMediaType" type="csapi:BadMediaTypeAPIFault" /> |
|
23 |
<element name="badMethod" type="csapi:BadMethodAPIFault" /> |
|
24 |
<element name="notImplemented" type="csapi:NotImplementedAPIFault" /> |
|
25 |
|
|
26 |
<!-- Complex Types --> |
|
27 |
<complexType name="CloudServersAPIFault"> |
|
28 |
<sequence> |
|
29 |
<element name="message" type="xsd:string" /> |
|
30 |
<element name="details" type="xsd:string" minOccurs="0" /> |
|
31 |
</sequence> |
|
32 |
<attribute name="code" type="xsd:int" use="required" /> |
|
33 |
</complexType> |
|
34 |
|
|
35 |
<complexType name="ItemNotFoundAPIFault"> |
|
36 |
<complexContent> |
|
37 |
<extension base="csapi:CloudServersAPIFault"> |
|
38 |
</extension> |
|
39 |
</complexContent> |
|
40 |
</complexType> |
|
41 |
|
|
42 |
<complexType name="RescueModeInUseAPIFault"> |
|
43 |
<complexContent> |
|
44 |
<extension base="csapi:CloudServersAPIFault"> |
|
45 |
</extension> |
|
46 |
</complexContent> |
|
47 |
</complexType> |
|
48 |
|
|
49 |
<complexType name="BuildInProgressAPIFault"> |
|
50 |
<complexContent> |
|
51 |
<extension base="csapi:CloudServersAPIFault"> |
|
52 |
</extension> |
|
53 |
</complexContent> |
|
54 |
</complexType> |
|
55 |
|
|
56 |
<complexType name="ServerCapacityUnavailableAPIFault"> |
|
57 |
<complexContent> |
|
58 |
<extension base="csapi:CloudServersAPIFault"> |
|
59 |
</extension> |
|
60 |
</complexContent> |
|
61 |
</complexType> |
|
62 |
|
|
63 |
<complexType name="BackupOrResizeInProgressAPIFault"> |
|
64 |
<complexContent> |
|
65 |
<extension base="csapi:CloudServersAPIFault"> |
|
66 |
</extension> |
|
67 |
</complexContent> |
|
68 |
</complexType> |
|
69 |
|
|
70 |
<complexType name="ResizeNotAllowedAPIFault"> |
|
71 |
<complexContent> |
|
72 |
<extension base="csapi:CloudServersAPIFault"> |
|
73 |
</extension> |
|
74 |
</complexContent> |
|
75 |
</complexType> |
|
76 |
|
|
77 |
<complexType name="ServiceUnavailableAPIFault"> |
|
78 |
<complexContent> |
|
79 |
<extension base="csapi:CloudServersAPIFault"> |
|
80 |
</extension> |
|
81 |
</complexContent> |
|
82 |
</complexType> |
|
83 |
|
|
84 |
<complexType name="UnauthorizedAPIFault"> |
|
85 |
<complexContent> |
|
86 |
<extension base="csapi:CloudServersAPIFault"> |
|
87 |
</extension> |
|
88 |
</complexContent> |
|
89 |
</complexType> |
|
90 |
|
|
91 |
<complexType name="OverLimitAPIFault"> |
|
92 |
<complexContent> |
|
93 |
<extension base="csapi:CloudServersAPIFault"> |
|
94 |
<attribute name="retryAfter" type="xsd:dateTime" use="optional" /> |
|
95 |
</extension> |
|
96 |
</complexContent> |
|
97 |
</complexType> |
|
98 |
|
|
99 |
<complexType name="BadRequestAPIFault"> |
|
100 |
<complexContent> |
|
101 |
<extension base="csapi:CloudServersAPIFault"> |
|
102 |
</extension> |
|
103 |
</complexContent> |
|
104 |
</complexType> |
|
105 |
|
|
106 |
<complexType name="BadMediaTypeAPIFault"> |
|
107 |
<complexContent> |
|
108 |
<extension base="csapi:CloudServersAPIFault"> |
|
109 |
</extension> |
|
110 |
</complexContent> |
|
111 |
</complexType> |
|
112 |
|
|
113 |
<complexType name="BadMethodAPIFault"> |
|
114 |
<complexContent> |
|
115 |
<extension base="csapi:CloudServersAPIFault"> |
|
116 |
</extension> |
|
117 |
</complexContent> |
|
118 |
</complexType> |
|
119 |
|
|
120 |
<complexType name="NotImplementedAPIFault"> |
|
121 |
<complexContent> |
|
122 |
<extension base="csapi:CloudServersAPIFault"> |
|
123 |
</extension> |
|
124 |
</complexContent> |
|
125 |
</complexType> |
|
126 |
|
|
127 |
</schema> |
b/main/conf/flavor.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
|
|
11 |
<element name="flavor" type="csapi:Flavor" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Flavor"> |
|
15 |
<attribute type="xsd:int" name="id" use="required" /> |
|
16 |
<attribute type="xsd:string" name="name" use="required" /> |
|
17 |
<!-- Is ram in MB? --> |
|
18 |
<attribute type="xsd:int" name="ram" use="optional" /> |
|
19 |
<!-- Is disk in GB? --> |
|
20 |
<attribute type="xsd:int" name="disk" use="optional" /> |
|
21 |
</complexType> |
|
22 |
|
|
23 |
</schema> |
|
24 |
|
b/main/conf/flavors.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="flavor.xsd" /> |
|
11 |
<element name="flavors" type="csapi:Flavors" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Flavors"> |
|
15 |
<sequence> |
|
16 |
<element name="flavor" type="csapi:Flavor" minOccurs="0" maxOccurs="1000"/> |
|
17 |
</sequence> |
|
18 |
</complexType> |
|
19 |
|
|
20 |
</schema> |
|
21 |
|
b/main/conf/image.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="common.xsd" /> |
|
11 |
<element name="image" type="csapi:Image" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Image"> |
|
15 |
<attribute type="xsd:int" name="id" use="optional" /> |
|
16 |
<attribute type="xsd:string" name="name" use="required" /> |
|
17 |
<attribute type="xsd:int" name="serverId" use="optional" /> |
|
18 |
<attribute type="xsd:dateTime" name="updated" use="optional" /> |
|
19 |
<attribute type="xsd:dateTime" name="created" use="optional" /> |
|
20 |
<attribute type="csapi:Progress" name="progress" use="optional" /> |
|
21 |
<attribute type="csapi:ImageStatus" name="status" use="optional" /> |
|
22 |
</complexType> |
|
23 |
|
|
24 |
<!-- Simple Types --> |
|
25 |
<simpleType name="ImageStatus"> |
|
26 |
<restriction base="xsd:string"> |
|
27 |
<enumeration value="UNKNOWN" /> |
|
28 |
<enumeration value="ACTIVE" /> |
|
29 |
<enumeration value="SAVING" /> |
|
30 |
<enumeration value="PREPARING" /> |
|
31 |
<enumeration value="QUEUED" /> |
|
32 |
<enumeration value="FAILED" /> |
|
33 |
</restriction> |
|
34 |
</simpleType> |
|
35 |
|
|
36 |
</schema> |
|
37 |
|
b/main/conf/images.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="image.xsd" /> |
|
11 |
<element name="images" type="csapi:Images" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Images"> |
|
15 |
<sequence> |
|
16 |
<element name="image" type="csapi:Image" minOccurs="0" maxOccurs="1000" /> |
|
17 |
</sequence> |
|
18 |
</complexType> |
|
19 |
</schema> |
|
20 |
|
b/main/conf/ipgroup.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<element name="sharedIpGroup" type="csapi:SharedIpGroup" /> |
|
11 |
|
|
12 |
<!-- Complex Types --> |
|
13 |
<complexType name="SharedIpGroup"> |
|
14 |
<sequence> |
|
15 |
<choice> |
|
16 |
<annotation> |
|
17 |
<xsd:documentation |
|
18 |
xml:lang="EN" |
|
19 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
20 |
<p> |
|
21 |
On a request a single ServerID <strong>may</strong> be |
|
22 |
specified. On a response a ServerIDList is always |
|
23 |
returned. This server list may be empty. |
|
24 |
</p> |
|
25 |
</xsd:documentation> |
|
26 |
</annotation> |
|
27 |
<element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="1"/> |
|
28 |
<element name="servers" type="csapi:ServerIDList"/> |
|
29 |
</choice> |
|
30 |
</sequence> |
|
31 |
<attribute type="xsd:int" name="id" use="optional" /> |
|
32 |
<attribute type="xsd:string" name="name" use="required" /> |
|
33 |
</complexType> |
|
34 |
|
|
35 |
<complexType name="ServerIDList"> |
|
36 |
<sequence> |
|
37 |
<element name="server" type="csapi:ServerID" minOccurs="0" maxOccurs="25" /> |
|
38 |
</sequence> |
|
39 |
</complexType> |
|
40 |
|
|
41 |
<complexType name="ServerID"> |
|
42 |
<attribute name="id" type="xsd:int" use="required" /> |
|
43 |
</complexType> |
|
44 |
</schema> |
|
45 |
|
|
46 |
|
|
47 |
|
b/main/conf/ipgroups.xsd | ||
---|---|---|
1 |
<schema |
|
2 |
elementFormDefault="qualified" |
|
3 |
attributeFormDefault="unqualified" |
|
4 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
5 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
6 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
7 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
8 |
> |
|
9 |
<include schemaLocation="ipgroup.xsd" /> |
|
10 |
<element name="sharedIpGroups" type="csapi:SharedIpGroups" /> |
|
11 |
|
|
12 |
<!-- Complex Types --> |
|
13 |
<complexType name="SharedIpGroups"> |
|
14 |
<sequence> |
|
15 |
<element name="sharedIpGroup" type="csapi:SharedIpGroup" minOccurs="0" maxOccurs="1000"/> |
|
16 |
</sequence> |
|
17 |
</complexType> |
|
18 |
|
|
19 |
</schema> |
|
20 |
|
b/main/conf/limits.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
|
|
11 |
<element name="limits" type="csapi:Limits" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Limits"> |
|
15 |
<sequence> |
|
16 |
<element name="rate" type="csapi:RateLimits" /> |
|
17 |
<element name="absolute" type="csapi:AbsoluteLimits" /> |
|
18 |
</sequence> |
|
19 |
</complexType> |
|
20 |
|
|
21 |
<complexType name="RateLimits"> |
|
22 |
<sequence> |
|
23 |
<element name="limit" type="csapi:RateLimit" minOccurs="1" maxOccurs="unbounded" /> |
|
24 |
</sequence> |
|
25 |
</complexType> |
|
26 |
|
|
27 |
<complexType name="AbsoluteLimits"> |
|
28 |
<sequence> |
|
29 |
<element name="limit" type="csapi:AbsoluteLimit" minOccurs="1" maxOccurs="unbounded"/> |
|
30 |
</sequence> |
|
31 |
</complexType> |
|
32 |
|
|
33 |
<complexType name="RateLimit"> |
|
34 |
<attribute name="verb" type="csapi:HTTPVerb" use="required" /> |
|
35 |
<attribute name="URI" type="xsd:string" use="required" /> |
|
36 |
<attribute name="regex" type="xsd:string" use="required" /> |
|
37 |
<attribute name="value" type="xsd:int" use="required" /> |
|
38 |
<attribute name="remaining" type="xsd:int" use="required" /> |
|
39 |
<attribute name="unit" type="csapi:RateLimitUnit" use="required" /> |
|
40 |
<attribute name="resetTime" type="xsd:long" use="required" /> |
|
41 |
</complexType> |
|
42 |
|
|
43 |
<complexType name="AbsoluteLimit"> |
|
44 |
<attribute name="name" type="xsd:string" use="required"/> |
|
45 |
<attribute name="value" type="xsd:int" use="required"/> |
|
46 |
</complexType> |
|
47 |
|
|
48 |
<!-- Simple Types --> |
|
49 |
<simpleType name="HTTPVerb"> |
|
50 |
<restriction base="xsd:string"> |
|
51 |
<enumeration value="POST" /> |
|
52 |
<enumeration value="PUT" /> |
|
53 |
<enumeration value="GET" /> |
|
54 |
<enumeration value="DELETE" /> |
|
55 |
<enumeration value="HEAD" /> |
|
56 |
</restriction> |
|
57 |
</simpleType> |
|
58 |
|
|
59 |
<simpleType name="RateLimitUnit"> |
|
60 |
<restriction base="xsd:string"> |
|
61 |
<enumeration value="MINUTE"/> |
|
62 |
<enumeration value="HOUR"/> |
|
63 |
<enumeration value="DAY"/> |
|
64 |
</restriction> |
|
65 |
</simpleType> |
|
66 |
|
|
67 |
</schema> |
|
68 |
|
b/main/conf/server.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="common.xsd" /> |
|
11 |
|
|
12 |
<element name="server" type="csapi:Server"> |
|
13 |
<annotation> |
|
14 |
<xsd:documentation |
|
15 |
xml:lang="EN" |
|
16 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
17 |
<p> |
|
18 |
Represents a server. |
|
19 |
</p> |
|
20 |
</xsd:documentation> |
|
21 |
</annotation> |
|
22 |
</element> |
|
23 |
|
|
24 |
<element name="addresses" type="csapi:Addresses"> |
|
25 |
<annotation> |
|
26 |
<xsd:documentation |
|
27 |
xml:lang="EN" |
|
28 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
29 |
<p> |
|
30 |
A list of addresses (public and private) belonging to a |
|
31 |
particular server. |
|
32 |
</p> |
|
33 |
</xsd:documentation> |
|
34 |
</annotation> |
|
35 |
</element> |
|
36 |
|
|
37 |
<element name="public" type="csapi:AddressList"> |
|
38 |
<annotation> |
|
39 |
<xsd:documentation |
|
40 |
xml:lang="EN" |
|
41 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
42 |
<p> |
|
43 |
A list of public addresses belonging to a particular server. |
|
44 |
</p> |
|
45 |
</xsd:documentation> |
|
46 |
</annotation> |
|
47 |
</element> |
|
48 |
|
|
49 |
<element name="private" type="csapi:AddressList"> |
|
50 |
<annotation> |
|
51 |
<xsd:documentation |
|
52 |
xml:lang="EN" |
|
53 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
54 |
<p> |
|
55 |
A list of private addresses belonging to a particular server. |
|
56 |
</p> |
|
57 |
</xsd:documentation> |
|
58 |
</annotation> |
|
59 |
</element> |
|
60 |
|
|
61 |
<element name="shareIp" type="csapi:ShareIp"> |
|
62 |
<annotation> |
|
63 |
<xsd:documentation |
|
64 |
xml:lang="EN" |
|
65 |
xmlns="http://www.w3.org/1999/xhtml"> |
|
66 |
<p> |
|
67 |
A request to share a public ip address. |
|
68 |
</p> |
|
69 |
</xsd:documentation> |
|
70 |
</annotation> |
|
71 |
</element> |
|
72 |
|
|
73 |
|
|
74 |
<!-- Complex Types --> |
|
75 |
<complexType name="Server"> |
|
76 |
<sequence> |
|
77 |
<element name="metadata" type="csapi:Metadata" minOccurs="0" /> |
|
78 |
<element ref="csapi:addresses" minOccurs="0" /> |
|
79 |
<element name="personality" type="csapi:Personality" minOccurs="0" /> |
|
80 |
</sequence> |
|
81 |
<attribute type="xsd:string" name="name" use="optional" /> |
|
82 |
<attribute type="xsd:int" name="id" use="optional" /> |
|
83 |
<attribute type="xsd:string" name="adminPass" use="optional"/> |
|
84 |
<attribute type="xsd:int" name="imageId" use="optional" /> |
|
85 |
<attribute type="xsd:int" name="flavorId" use="optional" /> |
|
86 |
<attribute type="xsd:string" name="hostId" use="optional" /> |
|
87 |
<attribute type="csapi:Progress" name="progress" use="optional" /> |
|
88 |
<attribute type="csapi:ServerStatus" name="status" use="optional" /> |
|
89 |
<attribute type="xsd:int" name="sharedIpGroupId" use="optional" /> |
|
90 |
</complexType> |
|
91 |
|
|
92 |
<complexType name="Metadata"> |
|
93 |
<sequence> |
|
94 |
<element name="meta" type="csapi:MetadataItem" minOccurs="0" maxOccurs="5" /> |
|
95 |
</sequence> |
|
96 |
</complexType> |
|
97 |
|
|
98 |
<complexType name="MetadataItem"> |
|
99 |
<simpleContent> |
|
100 |
<extension base="csapi:MetadataValue"> |
|
101 |
<attribute name="key" type="csapi:MetadataKey" use="required"/> |
|
102 |
</extension> |
|
103 |
</simpleContent> |
|
104 |
</complexType> |
|
105 |
|
|
106 |
<complexType name="Personality"> |
|
107 |
<sequence> |
|
108 |
<!-- should the number of files be unbounded? --> |
|
109 |
<element name="file" type="csapi:File" minOccurs="0" maxOccurs="5" /> |
|
110 |
</sequence> |
|
111 |
</complexType> |
|
112 |
|
|
113 |
<complexType name="File"> |
|
114 |
<simpleContent> |
|
115 |
<extension base="csapi:FileContent"> |
|
116 |
<attribute name="path" type="csapi:FileName" use="required" /> |
|
117 |
</extension> |
|
118 |
</simpleContent> |
|
119 |
</complexType> |
|
120 |
|
|
121 |
<complexType name="Addresses"> |
|
122 |
<sequence> |
|
123 |
<element ref="csapi:public" minOccurs="0" /> |
|
124 |
<element ref="csapi:private" minOccurs="0" /> |
|
125 |
</sequence> |
|
126 |
</complexType> |
|
127 |
|
|
128 |
<complexType name="AddressList"> |
|
129 |
<sequence> |
|
130 |
<element name="ip" type="csapi:Address" minOccurs="0" maxOccurs="unbounded" /> |
|
131 |
</sequence> |
|
132 |
</complexType> |
|
133 |
|
|
134 |
<complexType name="Address"> |
|
135 |
<!-- really need a better simple type than a string --> |
|
136 |
<attribute name="addr" type="xsd:string" use="required" /> |
|
137 |
</complexType> |
|
138 |
|
|
139 |
<complexType name="ShareIp"> |
|
140 |
<attribute name="sharedIpGroupId" type="xsd:int" use="required" /> |
|
141 |
<attribute name="configureServer" type="xsd:boolean" default="false" /> |
|
142 |
</complexType> |
|
143 |
|
|
144 |
<!-- Simple Types --> |
|
145 |
<simpleType name="ServerStatus"> |
|
146 |
<restriction base="xsd:string"> |
|
147 |
<enumeration value="ACTIVE" /> |
|
148 |
<enumeration value="SUSPENDED" /> |
|
149 |
<enumeration value="DELETED" /> |
|
150 |
<enumeration value="QUEUE_RESIZE" /> |
|
151 |
<enumeration value="PREP_RESIZE" /> |
|
152 |
<enumeration value="RESIZE" /> |
|
153 |
<enumeration value="VERIFY_RESIZE" /> |
|
154 |
<enumeration value="QUEUE_MOVE" /> |
|
155 |
<enumeration value="PREP_MOVE" /> |
|
156 |
<enumeration value="MOVE" /> |
|
157 |
<enumeration value="VERIFY_MOVE" /> |
|
158 |
<enumeration value="RESCUE" /> |
|
159 |
<enumeration value="ERROR" /> |
|
160 |
<enumeration value="BUILD" /> |
|
161 |
<enumeration value="RESTORING" /> |
|
162 |
<enumeration value="PASSWORD" /> |
|
163 |
<enumeration value="REBUILD" /> |
|
164 |
<enumeration value="DELETE_IP" /> |
|
165 |
<enumeration value="SHARE_IP_NO_CONFIG" /> |
|
166 |
<enumeration value="SHARE_IP" /> |
|
167 |
<enumeration value="REBOOT" /> |
|
168 |
<enumeration value="HARD_REBOOT" /> |
|
169 |
<enumeration value="UNKNOWN" /> |
|
170 |
</restriction> |
|
171 |
</simpleType> |
|
172 |
|
|
173 |
<simpleType name="FileName"> |
|
174 |
<restriction base="xsd:string"> |
|
175 |
<maxLength value="255" /> |
|
176 |
</restriction> |
|
177 |
</simpleType> |
|
178 |
|
|
179 |
<simpleType name="FileContent"> |
|
180 |
<restriction base="xsd:base64Binary"> |
|
181 |
<maxLength value="10240" /> |
|
182 |
</restriction> |
|
183 |
</simpleType> |
|
184 |
|
|
185 |
<simpleType name="MetadataKey"> |
|
186 |
<restriction base="xsd:string"> |
|
187 |
<maxLength value="255" /> |
|
188 |
</restriction> |
|
189 |
</simpleType> |
|
190 |
|
|
191 |
<simpleType name="MetadataValue"> |
|
192 |
<restriction base="xsd:string"> |
|
193 |
<maxLength value="255" /> |
|
194 |
</restriction> |
|
195 |
</simpleType> |
|
196 |
</schema> |
b/main/conf/servers.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<include schemaLocation="server.xsd" /> |
|
11 |
<element name="servers" type="csapi:Servers" /> |
|
12 |
|
|
13 |
<!-- Complex Types --> |
|
14 |
<complexType name="Servers"> |
|
15 |
<sequence> |
|
16 |
<element name="server" type="csapi:Server" minOccurs="0" maxOccurs="1000" /> |
|
17 |
</sequence> |
|
18 |
</complexType> |
|
19 |
</schema> |
b/main/conf/version.xsd | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<schema |
|
3 |
elementFormDefault="qualified" |
|
4 |
attributeFormDefault="unqualified" |
|
5 |
xmlns="http://www.w3.org/2001/XMLSchema" |
|
6 |
xmlns:csapi="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
7 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|
8 |
targetNamespace="http://docs.rackspacecloud.com/servers/api/v1.0" |
|
9 |
> |
|
10 |
<element name="version" type="csapi:Version" /> |
|
11 |
|
|
12 |
<!-- Complex Types --> |
|
13 |
<complexType name="Version"> |
|
14 |
<attribute type="xsd:string" name="id" use="required" fixed="v1.0" /> |
|
15 |
<attribute type="csapi:VersionStatus" name="status" use="required" /> |
|
16 |
<attribute type="xsd:anyURI" name="docURL" use="required" /> |
|
17 |
<attribute type="xsd:anyURI" name="wadl" use="required" /> |
|
18 |
</complexType> |
|
19 |
|
|
20 |
<!-- Simple Types --> |
|
21 |
<simpleType name="VersionStatus"> |
|
22 |
<restriction base="xsd:string"> |
|
23 |
<enumeration value="BETA" /> |
|
24 |
<enumeration value="CURRENT" /> |
|
25 |
<enumeration value="DEPRECATED"/> |
|
26 |
</restriction> |
|
27 |
</simpleType> |
|
28 |
</schema> |
|
29 |
|
b/main/java/net/elasticgrid/rackspace/cloudservers/Addresses.java | ||
---|---|---|
1 |
/** |
|
2 |
* Licensed to the Apache Software Foundation (ASF) under one |
|
3 |
* or more contributor license agreements. See the NOTICE file |
|
4 |
* distributed with this work for additional information |
|
5 |
* regarding copyright ownership. The ASF licenses this file |
|
6 |
* to you under the Apache License, Version 2.0 (the |
|
7 |
* "License"); you may not use this file except in compliance |
|
8 |
* with the License. You may obtain a copy of the License at |
|
9 |
* |
|
10 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
* |
|
12 |
* Unless required by applicable law or agreed to in writing, |
|
13 |
* software distributed under the License is distributed on an |
|
14 |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
15 |
* KIND, either express or implied. See the License for the |
|
16 |
* specific language governing permissions and limitations |
|
17 |
* under the License. |
|
18 |
*/ |
|
19 |
package net.elasticgrid.rackspace.cloudservers; |
|
20 |
|
|
21 |
import net.elasticgrid.rackspace.cloudservers.internal.Public; |
|
22 |
import net.elasticgrid.rackspace.cloudservers.internal.Private; |
|
23 |
import java.io.Serializable; |
|
24 |
import java.net.InetAddress; |
|
25 |
import java.net.UnknownHostException; |
|
26 |
import java.util.List; |
|
27 |
import java.util.ArrayList; |
|
28 |
|
|
29 |
/** |
|
30 |
* Addresses are either public or private. |
|
31 |
* @author Jerome Bernard |
|
32 |
*/ |
|
33 |
public class Addresses implements Serializable { |
|
34 |
private final List<InetAddress> publicAddresses; |
|
35 |
private final List<InetAddress> privateAddresses; |
|
36 |
|
|
37 |
public Addresses(List<InetAddress> publicAddresses, List<InetAddress> privateAddresses) { |
|
38 |
this.publicAddresses = publicAddresses; |
|
39 |
this.privateAddresses = privateAddresses; |
|
40 |
} |
|
41 |
|
|
42 |
public Addresses(net.elasticgrid.rackspace.cloudservers.internal.Addresses addresses) throws UnknownHostException { |
|
43 |
// populate public addresses list |
|
44 |
Public publicAddresses = addresses.getPublic(); |
|
45 |
this.publicAddresses = new ArrayList<InetAddress>(publicAddresses.getAddressLists().size()); |
|
46 |
for (net.elasticgrid.rackspace.cloudservers.internal.Address address : publicAddresses.getAddressLists()) { |
|
47 |
this.publicAddresses.add(InetAddress.getByName(address.getAddr())); |
|
48 |
} |
|
49 |
// populate private addresses list |
|
50 |
Private privateAddresses = addresses.getPrivate(); |
|
51 |
this.privateAddresses = new ArrayList<InetAddress>(privateAddresses.getAddressLists().size()); |
|
52 |
for (net.elasticgrid.rackspace.cloudservers.internal.Address address : privateAddresses.getAddressLists()) { |
|
53 |
this.privateAddresses.add(InetAddress.getByName(address.getAddr())); |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
public List<InetAddress> getPublicAddresses() { |
|
58 |
return publicAddresses; |
|
59 |
} |
|
60 |
|
|
61 |
public List<InetAddress> getPrivateAddresses() { |
|
62 |
return privateAddresses; |
|
63 |
} |
|
64 |
|
|
65 |
@Override |
|
66 |
public String toString() { |
|
67 |
final StringBuilder sb = new StringBuilder(); |
|
68 |
sb.append("Addresses"); |
|
69 |
sb.append("{publicAddresses=").append(publicAddresses); |
|
70 |
sb.append(", privateAddresses=").append(privateAddresses); |
|
71 |
sb.append('}'); |
|
72 |
return sb.toString(); |
|
73 |
} |
|
74 |
} |
b/main/java/net/elasticgrid/rackspace/cloudservers/BackupSchedule.java | ||
---|---|---|
1 |
/** |
|
2 |
* Licensed to the Apache Software Foundation (ASF) under one |
|
3 |
* or more contributor license agreements. See the NOTICE file |
|
4 |
* distributed with this work for additional information |
|
5 |
* regarding copyright ownership. The ASF licenses this file |
|
6 |
* to you under the Apache License, Version 2.0 (the |
|
7 |
* "License"); you may not use this file except in compliance |
|
8 |
* with the License. You may obtain a copy of the License at |
|
9 |
* |
|
10 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
* |
|
12 |
* Unless required by applicable law or agreed to in writing, |
|
13 |
* software distributed under the License is distributed on an |
|
14 |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
15 |
* KIND, either express or implied. See the License for the |
|
16 |
* specific language governing permissions and limitations |
|
17 |
* under the License. |
|
18 |
*/ |
|
19 |
package net.elasticgrid.rackspace.cloudservers; |
|
20 |
|
|
21 |
import java.io.Serializable; |
|
22 |
|
|
23 |
/** |
|
24 |
* Server backup schedule. |
|
25 |
* |
|
26 |
* @author Jerome Bernard |
|
27 |
*/ |
|
28 |
public class BackupSchedule implements Serializable { |
|
29 |
private boolean enabled; |
|
30 |
private WeeklyBackup weekly; |
|
31 |
private DailyBackup daily; |
|
32 |
|
|
33 |
public BackupSchedule(boolean enabled, WeeklyBackup weekly, DailyBackup daily) { |
|
34 |
this.enabled = enabled; |
|
35 |
this.weekly = weekly; |
|
36 |
this.daily = daily; |
|
37 |
} |
|
38 |
|
|
39 |
public boolean isEnabled() { |
|
40 |
return enabled; |
|
41 |
} |
|
42 |
|
|
43 |
public WeeklyBackup getWeekly() { |
|
44 |
return weekly; |
|
45 |
} |
|
46 |
|
|
47 |
public DailyBackup getDaily() { |
|
48 |
return daily; |
|
49 |
} |
|
50 |
|
|
51 |
public enum WeeklyBackup implements Serializable { |
|
52 |
DISABLED("DISABLED"), SUNDAY("SUNDAY"), MONDAY("MONDAY"), TUESDAY("TUESDAY"), |
|
53 |
WEDNESDAY("WEDNESDAY"), THURSDAY("THURSDAY"), FRIDAY("FRIDAY"), |
|
54 |
SATURDAY("SATURDAY"), SUNDAY1("SUNDAY"); |
|
55 |
private final String value; |
|
56 |
|
|
57 |
private WeeklyBackup(String value) { |
|
58 |
this.value = value; |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
public enum DailyBackup implements Serializable { |
|
63 |
DISABLED, H_0000_0200, H_0200_0400, H_0400_0600, H_0600_0800, H_0800_1000, |
|
64 |
H_1000_1200, H_1200_1400, H_1400_1600, H_1600_1800, H_1800_2000, |
|
65 |
H_2000_2200, H_2200_0000 |
|
66 |
} |
|
67 |
|
|
68 |
@Override |
|
69 |
public String toString() { |
|
70 |
final StringBuilder sb = new StringBuilder(); |
|
71 |
sb.append("BackupSchedule"); |
|
72 |
sb.append("{enabled=").append(enabled); |
|
73 |
sb.append(", weekly=").append(weekly); |
|
74 |
sb.append(", daily=").append(daily); |
|
75 |
sb.append('}'); |
|
76 |
return sb.toString(); |
|
77 |
} |
|
78 |
} |
b/main/java/net/elasticgrid/rackspace/cloudservers/CloudServers.java | ||
---|---|---|
1 |
/** |
|
2 |
* Licensed to the Apache Software Foundation (ASF) under one |
|
3 |
* or more contributor license agreements. See the NOTICE file |
|
4 |
* distributed with this work for additional information |
|
5 |
* regarding copyright ownership. The ASF licenses this file |
|
6 |
* to you under the Apache License, Version 2.0 (the |
|
7 |
* "License"); you may not use this file except in compliance |
|
8 |
* with the License. You may obtain a copy of the License at |
|
9 |
* |
|
10 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
* |
|
12 |
* Unless required by applicable law or agreed to in writing, |
|
13 |
* software distributed under the License is distributed on an |
|
14 |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
15 |
* KIND, either express or implied. See the License for the |
|
16 |
* specific language governing permissions and limitations |
|
17 |
* under the License. |
|
18 |
*/ |
|
19 |
package net.elasticgrid.rackspace.cloudservers; |
|
20 |
|
|
21 |
import java.util.List; |
|
22 |
import java.util.Map; |
|
23 |
import java.net.InetAddress; |
|
24 |
|
|
25 |
/** |
|
26 |
* Rackspace Cloud Servers API. |
|
27 |
* |
|
28 |
* @author Jerome Bernard |
|
29 |
*/ |
|
30 |
public interface CloudServers { |
|
31 |
|
|
32 |
/** |
|
33 |
* Retrieve the list of servers (only IDs and names) associated with the Rackspace account. |
|
34 |
* |
|
35 |
* @return the list of servers |
|
36 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
37 |
*/ |
|
38 |
List<Server> getServers() throws CloudServersException; |
|
39 |
|
|
40 |
/** |
|
41 |
* Retrieve the list of servers (with details) associated with the Rackspace account. |
|
42 |
* |
|
43 |
* @return the list of servers |
|
44 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
45 |
*/ |
|
46 |
List<Server> getServersWithDetails() throws CloudServersException; |
|
47 |
|
|
48 |
/** |
|
49 |
* Retrieve the server details. |
|
50 |
* |
|
51 |
* @param serverID the ID of the server for which details should be retrieved |
|
52 |
* @return the server details |
|
53 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
54 |
*/ |
|
55 |
Server getServerDetails(int serverID) throws CloudServersException; |
|
56 |
|
|
57 |
/** |
|
58 |
* Retrieve server addresses. |
|
59 |
* |
|
60 |
* @param serverID the ID of the server for which addresses should be retrieved |
|
61 |
* @return the server addresses |
|
62 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
63 |
*/ |
|
64 |
Addresses getServerAddresses(int serverID) throws CloudServersException; |
|
65 |
|
|
66 |
/** |
|
67 |
* Retrieve public server addresses. |
|
68 |
* |
|
69 |
* @param serverID the ID of the server for which addresses should be retrieved |
|
70 |
* @return the server addresses |
|
71 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
72 |
*/ |
|
73 |
List<InetAddress> getServerPublicAddresses(int serverID) throws CloudServersException; |
|
74 |
|
|
75 |
/** |
|
76 |
* Retrieve private server addresses. |
|
77 |
* |
|
78 |
* @param serverID the ID of the server for which addresses should be retrieved |
|
79 |
* @return the server addresses |
|
80 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
81 |
*/ |
|
82 |
List<InetAddress> getServerPrivateAddresses(int serverID) throws CloudServersException; |
|
83 |
|
|
84 |
/** |
|
85 |
* Share an IP address to the specified server. |
|
86 |
* |
|
87 |
* @param groupID the ID of the shared IP group |
|
88 |
* @param serverID the ID of the server for which the IP should be shared |
|
89 |
* @param address the IP¨address to share with the server |
|
90 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
91 |
*/ |
|
92 |
void shareAddress(int groupID, int serverID, InetAddress address) throws CloudServersException; |
|
93 |
|
|
94 |
/** |
|
95 |
* Share an IP address to the specified server. |
|
96 |
* |
|
97 |
* @param groupID the ID of the shared IP group |
|
98 |
* @param serverID the ID of the server for which the IP should be shared |
|
99 |
* @param address the IP¨address to share with the server |
|
100 |
* @param configureServer if true the server is configured with the new address, though the new address is not |
|
101 |
* enabled; configuring the server does require a reboot |
|
102 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
103 |
*/ |
|
104 |
void shareAddress(int groupID, int serverID, InetAddress address, boolean configureServer) throws CloudServersException; |
|
105 |
|
|
106 |
/** |
|
107 |
* Remove a shared IP address from the specified server. |
|
108 |
* |
|
109 |
* @param serverID the ID of the server for which the IP should be not be shared anymore |
|
110 |
* @param address the IP¨address to stop sharing with the server |
|
111 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
112 |
*/ |
|
113 |
void unshareAddress(int serverID, InetAddress address) throws CloudServersException; |
|
114 |
|
|
115 |
/** |
|
116 |
* Provision a new server. |
|
117 |
* |
|
118 |
* @param name the name of the server to create |
|
119 |
* @param imageID the image from which the server should be created |
|
120 |
* @param flavorID the kind of hardware to use |
|
121 |
* @return the created server with precious information such as admin password for that server |
|
122 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
123 |
*/ |
|
124 |
Server createServer(String name, int imageID, int flavorID) throws CloudServersException; |
|
125 |
|
|
126 |
/** |
|
127 |
* Provision a new server. |
|
128 |
* |
|
129 |
* @param name the name of the server to create |
|
130 |
* @param imageID the image from which the server should be created |
|
131 |
* @param flavorID the kind of hardware to use |
|
132 |
* @param metadata the launch metadata |
|
133 |
* @return the created server with precious information such as admin password for that server |
|
134 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
135 |
*/ |
|
136 |
Server createServer(String name, int imageID, int flavorID, Map<String, String> metadata) throws CloudServersException; |
|
137 |
|
|
138 |
/** |
|
139 |
* Reboot the specified server. |
|
140 |
* |
|
141 |
* @param serverID the ID of the server to reboot |
|
142 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
143 |
* @see #rebootServer(int, RebootType) |
|
144 |
*/ |
|
145 |
void rebootServer(int serverID) throws CloudServersException; |
|
146 |
|
|
147 |
/** |
|
148 |
* Reboot the specified server. |
|
149 |
* |
|
150 |
* @param serverID the ID of the server to reboot |
|
151 |
* @param type the type of reboot to perform |
|
152 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
153 |
* @see #rebootServer(int, RebootType) |
|
154 |
*/ |
|
155 |
void rebootServer(int serverID, RebootType type) throws CloudServersException; |
|
156 |
|
|
157 |
/** |
|
158 |
* Rebuild the specified server. |
|
159 |
* |
|
160 |
* @param serverID the ID of the server to rebuild |
|
161 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
162 |
* @see #rebuildServer(int, int) |
|
163 |
*/ |
|
164 |
void rebuildServer(int serverID) throws CloudServersException; |
|
165 |
|
|
166 |
/** |
|
167 |
* Rebuild the specified server from an different image than the one initially used. |
|
168 |
* |
|
169 |
* @param serverID the ID of the server to rebuild |
|
170 |
* @param imageID the new image to use |
|
171 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
172 |
* @see #rebuildServer(int) |
|
173 |
*/ |
|
174 |
void rebuildServer(int serverID, int imageID) throws CloudServersException; |
|
175 |
|
|
176 |
/** |
|
177 |
* Resize the specified server. |
|
178 |
* |
|
179 |
* @param serverID the ID of the server to resize |
|
180 |
* @param flavorID the new flavor of hardware which should be used |
|
181 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
182 |
*/ |
|
183 |
void resizeServer(int serverID, int flavorID) throws CloudServersException; |
|
184 |
|
|
185 |
/** |
|
186 |
* Confirm a pending resize action. |
|
187 |
* |
|
188 |
* @param serverID the ID of the server for which the resize should be confirmed |
|
189 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
190 |
*/ |
|
191 |
void confirmResize(int serverID) throws CloudServersException; |
|
192 |
|
|
193 |
/** |
|
194 |
* Cancel and revert a pending resize action. |
|
195 |
* |
|
196 |
* @param serverID the ID of the server for which the resize should be cancelled |
|
197 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
198 |
*/ |
|
199 |
void revertResize(int serverID) throws CloudServersException; |
|
200 |
|
|
201 |
/** |
|
202 |
* Update the specified server's name and/or administrative password. This operation allows you to update the name |
|
203 |
* of the server and change the administrative password. This operation changes the name of the server in the Cloud |
|
204 |
* Servers system and does not change the server host name itself. |
|
205 |
* |
|
206 |
* @param serverID the ID of the server to update |
|
207 |
* @param name the new name for the server |
|
208 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
209 |
*/ |
|
210 |
void updateServerName(int serverID, String name) throws CloudServersException; |
|
211 |
|
|
212 |
/** |
|
213 |
* Update the specified server's name and/or administrative password. This operation allows you to update the name |
|
214 |
* of the server and change the administrative password. This operation changes the name of the server in the Cloud |
|
215 |
* Servers system and does not change the server host name itself. |
|
216 |
* |
|
217 |
* @param serverID the ID of the server to update |
|
218 |
* @param password the new password |
|
219 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
220 |
*/ |
|
221 |
void updateServerPassword(int serverID, String password) throws CloudServersException; |
|
222 |
|
|
223 |
/** |
|
224 |
* Update the specified server's name and/or administrative password. This operation allows you to update the name |
|
225 |
* of the server and change the administrative password. This operation changes the name of the server in the Cloud |
|
226 |
* Servers system and does not change the server host name itself. |
|
227 |
* |
|
228 |
* @param serverID the ID of the server to update |
|
229 |
* @param name the new name for the server |
|
230 |
* @param password the new password |
|
231 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
232 |
*/ |
|
233 |
void updateServerNameAndPassword(int serverID, String name, String password) throws CloudServersException; |
|
234 |
|
|
235 |
/** |
|
236 |
* Deletes a cloud server instance from the system |
|
237 |
* |
|
238 |
* @param serverID the ID of the server to delete |
|
239 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
240 |
*/ |
|
241 |
void deleteServer(int serverID) throws CloudServersException; |
|
242 |
|
|
243 |
/** |
|
244 |
* Return the limits for the Rackspace API account. |
|
245 |
* |
|
246 |
* @return the limits |
|
247 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
248 |
*/ |
|
249 |
Limits getLimits() throws CloudServersException; |
|
250 |
|
|
251 |
/** |
|
252 |
* Retrieve the list of flavors (only IDs and names) associated with the Rackspace account. |
|
253 |
* |
|
254 |
* @return the flavors |
|
255 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
256 |
*/ |
|
257 |
List<Flavor> getFlavors() throws CloudServersException; |
|
258 |
|
|
259 |
/** |
|
260 |
* Retrieve the list of flavors (with details) associated with the Rackspace account. |
|
261 |
* |
|
262 |
* @return the flavors |
|
263 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
264 |
*/ |
|
265 |
List<Flavor> getFlavorsWithDetails() throws CloudServersException; |
|
266 |
|
|
267 |
/** |
|
268 |
* Retrieve the flavor details. |
|
269 |
* |
|
270 |
* @param flavorID the ID of the flavor for which details should be retrieved |
|
271 |
* @return the flavor details |
|
272 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
273 |
*/ |
|
274 |
Flavor getFlavorDetails(int flavorID) throws CloudServersException; |
|
275 |
|
|
276 |
/** |
|
277 |
* Retrieve the list of images (only IDs and names) associated with the Rackspace account. |
|
278 |
* |
|
279 |
* @return the images |
|
280 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
281 |
*/ |
|
282 |
List<Image> getImages() throws CloudServersException; |
|
283 |
|
|
284 |
/** |
|
285 |
* Retrieve the list of images (with details) associated with the Rackspace account. |
|
286 |
* |
|
287 |
* @return the images |
|
288 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
289 |
*/ |
|
290 |
List<Image> getImagesWithDetails() throws CloudServersException; |
|
291 |
|
|
292 |
/** |
|
293 |
* Retrieve the image details. |
|
294 |
* |
|
295 |
* @param imageID the ID of the image for which details should be retrieved |
|
296 |
* @return the image details |
|
297 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
298 |
*/ |
|
299 |
Image getImageDetails(int imageID) throws CloudServersException; |
|
300 |
|
|
301 |
/** |
|
302 |
* Create a new image from a server. |
|
303 |
* |
|
304 |
* @param name the name of the image to create |
|
305 |
* @param serverID the ID of the server whose content will be used for creating the image |
|
306 |
* @return the created image details |
|
307 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
308 |
*/ |
|
309 |
Image createImage(String name, int serverID) throws CloudServersException; |
|
310 |
|
|
311 |
/** |
|
312 |
* Retrieve the backup schedule for a server. |
|
313 |
* |
|
314 |
* @param serverID the ID of the server for which the backup schedule should be retrieved |
|
315 |
* @return the backup schedule |
|
316 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
317 |
*/ |
|
318 |
BackupSchedule getBackupSchedule(int serverID) throws CloudServersException; |
|
319 |
|
|
320 |
/** |
|
321 |
* Create or update backup schedule for a server. |
|
322 |
* |
|
323 |
* @param serverID the ID of the server for which the backup schedule should be created/updated |
|
324 |
* @param schedule the backup schedule |
|
325 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
326 |
*/ |
|
327 |
void scheduleBackup(int serverID, BackupSchedule schedule) throws CloudServersException; |
|
328 |
|
|
329 |
/** |
|
330 |
* Delete backup schedule for a server. |
|
331 |
* |
|
332 |
* @param serverID the ID of the server for which the backup schedule should be deleted |
|
333 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
334 |
*/ |
|
335 |
void deleteBackupSchedule(int serverID) throws CloudServersException; |
|
336 |
|
|
337 |
/** |
|
338 |
* Retrieve the list of shared IP groups (only IDs and names) associated with the Rackspace account. |
|
339 |
* |
|
340 |
* @return the list of shared IP groups |
|
341 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
342 |
*/ |
|
343 |
List<SharedIPGroup> getSharedIPGroups() throws CloudServersException; |
|
344 |
|
|
345 |
/** |
|
346 |
* Retrieve the list of shared IP groups (with details) associated with the Rackspace account. |
|
347 |
* |
|
348 |
* @return the list of shared IP groups |
|
349 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
350 |
*/ |
|
351 |
List<SharedIPGroup> getSharedIPGroupsWithDetails() throws CloudServersException; |
|
352 |
|
|
353 |
/** |
|
354 |
* Retrieve the shared IP group details. |
|
355 |
* |
|
356 |
* @param groupID the ID of the shared IP group |
|
357 |
* @return the shared IP group |
|
358 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
359 |
*/ |
|
360 |
SharedIPGroup getSharedIPGroup(int groupID) throws CloudServersException; |
|
361 |
|
|
362 |
/** |
|
363 |
* Create a new shared IP group. |
|
364 |
* |
|
365 |
* @param name the name of the shared IP group to create |
|
366 |
* @return the created shared IP group |
|
367 |
* @throws CloudServersException if there is an exception when calling the Cloud Servers API |
|
368 |
* @see #createSharedIPGroup(String, int) |
|
369 |
*/ |
|
370 |
SharedIPGroup createSharedIPGroup(String name) throws CloudServersException; |
|
371 |
|
|
372 |
/** |
|
373 |
* Create a new shared IP group. |
|
374 |
* |
Also available in: Unified diff