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

« back to all changes in this revision

Viewing changes to util/data.h

  • 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:
71
71
    char *userId;
72
72
} ncMetadata;
73
73
 
74
 
typedef struct ncInstParams_t {
75
 
  int memorySize;
76
 
  int diskSize;
77
 
  int numberOfCores;
78
 
} ncInstParams;
79
 
 
80
 
typedef struct ncNetConf_t {
81
 
  int vlan;
82
 
  char publicMac[32], privateMac[32], publicIp[32], privateIp[32];
83
 
} ncNetConf;
 
74
typedef struct deviceMapping_t {
 
75
        char deviceName[64];
 
76
        char virtualName[64];
 
77
        int size;
 
78
        char format[64];
 
79
} deviceMapping;
 
80
 
 
81
typedef struct virtualMachine_t {
 
82
        int mem, cores, disk;
 
83
        char name[64];
 
84
        deviceMapping deviceMapping[EUCA_MAX_DEVMAPS];
 
85
} virtualMachine;
 
86
int allocate_virtualMachine(virtualMachine *out, const virtualMachine *in);
 
87
 
 
88
typedef struct netConfig_t {
 
89
  int vlan, networkIndex;
 
90
  char privateMac[24], publicIp[24], privateIp[24];
 
91
} netConfig;
 
92
int allocate_netConfig(netConfig *out, char *pvMac, char *pvIp, char *pbIp, int vlan, int networkIndex);
84
93
 
85
94
typedef struct ncVolume_t {
86
95
    char volumeId[CHAR_BUFFER_SIZE];
87
96
    char remoteDev[CHAR_BUFFER_SIZE];
88
97
    char localDev[CHAR_BUFFER_SIZE];
 
98
    char localDevReal[CHAR_BUFFER_SIZE];
89
99
    char stateName[CHAR_BUFFER_SIZE];
90
100
} ncVolume;
91
101
 
104
114
    /* state as reported to CC & CLC */
105
115
    char stateName[CHAR_BUFFER_SIZE];  /* as string */
106
116
    int stateCode; /* as int */
 
117
 
107
118
    /* state as NC thinks of it */
108
 
    int state;
109
 
    
 
119
    instance_states state;
 
120
 
110
121
    char keyName[CHAR_BUFFER_SIZE*4];
111
122
    char privateDnsName[CHAR_BUFFER_SIZE];
112
123
    char dnsName[CHAR_BUFFER_SIZE];
113
 
    int launchTime;
114
 
    int terminationTime;
 
124
    int launchTime; // timestamp of RunInstances request arrival
 
125
    int bootTime; // timestamp of STAGING->BOOTING transition
 
126
    int terminationTime; // timestamp of when resources are released (->TEARDOWN transition)
115
127
    
116
 
    ncInstParams params;
117
 
    ncNetConf ncnet;
 
128
    virtualMachine params;
 
129
    netConfig ncnet;
118
130
    pthread_t tcb;
119
131
 
120
132
    /* passed into NC via runInstances for safekeeping */
163
175
void free_metadata(ncMetadata ** meta);
164
176
 
165
177
ncInstance * allocate_instance(char *instanceId, char *reservationId, 
166
 
                               ncInstParams *params, 
 
178
                               virtualMachine *params, 
167
179
                               char *imageId, char *imageURL, 
168
180
                               char *kernelId, char *kernelURL, 
169
181
                               char *ramdiskId, char *ramdiskURL, 
170
182
                               char *stateName, int stateCode, char *userId, 
171
 
                               ncNetConf *ncnet, char *keyName,
 
183
                               netConfig *ncnet, char *keyName,
172
184
                               char *userData, char *launchIndex, char **groupNames, int groupNamesSize);
173
185
void free_instance (ncInstance ** inst);
174
186
 
179
191
                               char *publicSubnets);
180
192
void free_resource(ncResource ** res);
181
193
ncVolume * find_volume (ncInstance * instance, char *volumeId);
182
 
ncVolume *  add_volume (ncInstance * instance, char *volumeId, char *remoteDev, char *localDev, char *stateName);
 
194
ncVolume *  add_volume (ncInstance * instance, char *volumeId, char *remoteDev, char *localDev, char *localDevReal, char *stateName);
183
195
ncVolume * free_volume (ncInstance * instance, char *volumeId, char *remoteDev, char *localDev);
184
196
 
185
197
#endif