~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/StorageController.groovy

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 *    WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT NEEDED TO COMPLY WITH
59
59
 *    ANY SUCH LICENSES OR RIGHTS.
60
60
 *******************************************************************************/
61
 
package edu.ucsb.eucalyptus.msgs
62
61
/*
63
62
 *
64
63
 * Author: Sunil Soman sunils@cs.ucsb.edu
65
64
 */
 
65
 
 
66
package edu.ucsb.eucalyptus.msgs;
 
67
 
66
68
public class StorageResponseType extends EucalyptusMessage {
67
69
        def StorageResponseType() {}
68
70
}
74
76
public class StorageErrorMessageType extends EucalyptusMessage {
75
77
        def StorageErrorMessageType() {
76
78
        }
77
 
 
 
79
        
78
80
        def StorageErrorMessageType(String code, String message, Integer httpCode, String requestId) {
79
81
                this.code = code;
80
82
                this.message = message;
81
83
                this.requestId = requestId;
82
84
                this.httpCode = httpCode;
83
85
        }
84
 
 
 
86
        
85
87
        public String toString() {
86
88
                return "StrorageErrorMessage:" + message;
87
89
        }
103
105
 
104
106
public class UpdateStorageConfigurationType extends StorageRequestType {
105
107
        String name;
106
 
        String storageRootDirectory;
107
 
        Integer maxTotalVolumeSize;
108
 
        Integer maxVolumeSize;
109
 
        String storageInterface;
110
 
        Boolean zeroFillVolumes;
111
 
 
 
108
        ArrayList<ComponentProperty> storageParams;
 
109
        
112
110
        def UpdateStorageConfigurationType() {}
113
 
 
114
 
        def UpdateStorageConfigurationType(StorageStateType storageState) {
115
 
                this.name = storageState.getName();
116
 
                this.storageRootDirectory = storageState.getVolumesPath();
117
 
                this.maxTotalVolumeSize = storageState.getMaxVolumeSizeInGB();
118
 
                this.maxVolumeSize = storageState.getTotalVolumesSizeInGB();
119
 
                this.storageInterface = storageState.getStorageInterface();
120
 
                this.zeroFillVolumes = storageState.getZeroFillVolumes();
121
 
        }
122
111
}
123
112
 
124
113
public class UpdateStorageConfigurationResponseType extends StorageResponseType {
127
116
public class GetStorageConfigurationType extends StorageRequestType {
128
117
        String name;
129
118
        def GetStorageConfigurationType() {}
130
 
 
 
119
        
131
120
        def GetStorageConfigurationType(String name) {
132
121
                this.name = name;               
133
122
        }
135
124
 
136
125
public class GetStorageConfigurationResponseType extends StorageResponseType {
137
126
        String name;
138
 
        String storageRootDirectory;
139
 
        Integer maxTotalVolumeSize;
140
 
        Integer maxVolumeSize;
141
 
        String storageInterface;
142
 
        Boolean zeroFillVolumes;
143
 
 
 
127
        ArrayList<ComponentProperty> storageParams;
144
128
        def GetStorageConfigurationResponseType() {}
145
 
 
 
129
        
146
130
        def GetStorageConfigurationResponseType(String name,
147
 
                        String storageRootDirectory,
148
 
                        Integer maxTotalVolumesSize,
149
 
                        Integer maxVolumeSize,
150
 
                        String storageInterface,
151
 
                        Boolean zeroFillVolumes) {
 
131
                        List<ComponentProperty> storageParams) {
152
132
                this.name = name;
153
 
                this.storageRootDirectory = storageRootDirectory;
154
 
                this.maxTotalVolumeSize = maxTotalVolumeSize;
155
 
                this.maxVolumeSize = maxVolumeSize;
156
 
                this.storageInterface = storageInterface;
157
 
                this.zeroFillVolumes = zeroFillVolumes;
 
133
                this.storageParams = storageParams;
158
134
        }
159
135
}
160
136
 
162
138
        String volumeId;
163
139
        String size;
164
140
        String snapshotId;
165
 
 
 
141
        
166
142
        def CreateStorageVolumeType() {
167
143
        }
168
 
 
 
144
        
169
145
        def CreateStorageVolumeType(final String volumeId, final String size, final String snapshotId) {
170
146
                this.volumeId = volumeId;
171
147
                this.size = size;
184
160
public class CreateStorageSnapshotType extends StorageRequestType {
185
161
        String volumeId;
186
162
        String snapshotId;
187
 
 
 
163
        
188
164
        def CreateStorageSnapshotType(final String volumeId, final String snapshotId) {
189
165
                this.volumeId = volumeId;
190
166
                this.snapshotId = snapshotId;
191
167
        }
192
 
 
 
168
        
193
169
        def CreateStorageSnapshotType() {
194
170
        }
195
171
}
203
179
 
204
180
public class DeleteStorageVolumeType extends StorageRequestType {
205
181
        String volumeId;
206
 
 
 
182
        
207
183
        def DeleteStorageVolumeType() {
208
184
        }
209
 
 
 
185
        
210
186
        def DeleteStorageVolumeType(final String volumeId) {
211
187
                this.volumeId = volumeId;
212
188
        }
213
 
 
 
189
        
214
190
}
215
191
 
216
192
public class DeleteStorageVolumeResponseType extends StorageResponseType {
218
194
 
219
195
public class DeleteStorageSnapshotType extends StorageRequestType {
220
196
        String snapshotId;
221
 
 
 
197
        
222
198
        def DeleteStorageSnapshotType() {
223
199
        }
224
 
 
 
200
        
225
201
        def DeleteStorageSnapshotType(final String snapshotId) {
226
202
                this.snapshotId = snapshotId;
227
203
        }
231
207
}
232
208
 
233
209
public class StorageVolume extends EucalyptusData {
234
 
 
 
210
        
235
211
        String volumeId;
236
212
        String size;
237
213
        String snapshotId;
239
215
        String createTime;
240
216
        String actualDeviceName;
241
217
        def StorageVolume() {}
242
 
 
 
218
        
243
219
        def StorageVolume(String volumeId) {
244
220
                this.volumeId = volumeId;
245
221
        }
247
223
 
248
224
public class DescribeStorageVolumesType extends StorageRequestType {
249
225
        ArrayList<String> volumeSet = new ArrayList<String>();
250
 
 
 
226
        
251
227
        def DescribeStorageVolumesType() {
252
228
        }
253
 
 
 
229
        
254
230
        def DescribeStorageVolumesType(final volumeSet) {
255
231
                this.volumeSet = volumeSet;
256
232
        }
257
 
 
 
233
        
258
234
}
259
235
public class DescribeStorageVolumesResponseType extends StorageResponseType {
260
236
        ArrayList<StorageVolume> volumeSet = new ArrayList<StorageVolume>();
270
246
 
271
247
public class DescribeStorageSnapshotsType extends StorageRequestType {
272
248
        ArrayList<String> snapshotSet = new ArrayList<String>();
273
 
 
 
249
        
274
250
        def DescribeStorageSnapshotsType() {
275
251
        }
276
 
 
 
252
        
277
253
        def DescribeStorageSnapshotsType(final snapshotSet) {
278
254
                this.snapshotSet = snapshotSet;
279
255
        }
280
 
 
 
256
        
281
257
}
282
258
public class DescribeStorageSnapshotsResponseType extends StorageResponseType {
283
259
        ArrayList<StorageSnapshot> snapshotSet = new ArrayList<StorageSnapshot>();
284
260
}
285
261
 
 
262
public class StorageComponentMessageType extends ComponentMessageType {       
 
263
}
 
264
 
 
265
public class StorageComponentMessageResponseType extends ComponentMessageResponseType {
 
266
}
 
267
 
 
268
public class ConvertVolumesType extends StorageComponentMessageType {
 
269
        String originalProvider;
 
270
        
 
271
        def ConvertVolumesType() {              
 
272
        }
 
273
}
 
274
 
 
275
public class ConvertVolumesResponseType extends StorageComponentMessageResponseType {
 
276
        def ConvertVolumesResponseType() {              
 
277
        }
 
278
}
 
279
 
286
280
public class StorageControllerHeartbeatMessage extends HeartbeatMessage {
287
281
 
288
282
        def StorageControllerHeartbeatMessage() {}
295
289
public class StorageUsageStatsRecord extends StatEventRecord {
296
290
        Long totalSpaceUsed;
297
291
        Integer numberOfVolumes;
298
 
 
 
292
        
299
293
        def StorageUsageStatsRecord() {}
300
 
 
 
294
        
301
295
        def StorageUsageStatsRecord(final Integer numberOfVolumes, 
302
 
                        final Long totalSpaceUsed) {                    
 
296
        final Long totalSpaceUsed) {                    
303
297
                super("StorageController", System.getProperty("euca.version"));
304
298
                this.totalSpaceUsed = totalSpaceUsed;
305
299
                this.numberOfVolumes = numberOfVolumes;
306
300
        }
307
 
 
 
301
        
308
302
        public String toString() {
309
303
                return String.format("Service: %s Version: %s Volumes: %d Space Used: %s", 
310
 
                                service, 
311
 
                                version, 
312
 
                                numberOfVolumes, 
313
 
                                totalSpaceUsed);
 
304
                service, 
 
305
                version, 
 
306
                numberOfVolumes, 
 
307
                totalSpaceUsed);
314
308
        }
315
 
 
 
309
        
316
310
        public static StorageUsageStatsRecord create(Integer numberOfVolumes, Long totalSpaceUsed) {
317
311
                return new StorageUsageStatsRecord(numberOfVolumes, totalSpaceUsed);
318
312
        }