~davewalker/ubuntu/maverick/eucalyptus/lp611144

« back to all changes in this revision

Viewing changes to cluster/generated/adb_virtualMachineType.c

  • Committer: Dustin Kirkland
  • Date: 2010-07-22 08:41:57 UTC
  • mfrom: (1050.1.19 ubuntu)
  • Revision ID: kirkland@x200-20100722084157-zh2p8dkawznvxxpn
Approving Dave Walker's merge of new upstream Eucalyptus 2.0 release.

Dustin Kirkland <kirkland@canonical.com>

* New major upstream version merge, 2.0 (r1211).
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 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:
1
 
 
2
 
 
3
 
        /**
4
 
         * adb_virtualMachineType.c
5
 
         *
6
 
         * This file was auto-generated from WSDL
7
 
         * by the Apache Axis2/C version: SNAPSHOT  Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
8
 
         */
9
 
 
10
 
        #include "adb_virtualMachineType.h"
11
 
 
12
 
                /*
13
 
                 * This type was generated from the piece of schema that had
14
 
                 * name = virtualMachineType
15
 
                 * Namespace URI = http://eucalyptus.ucsb.edu/
16
 
                 * Namespace Prefix = ns1
17
 
                 */
18
 
 
19
 
 
20
 
 
21
 
        struct adb_virtualMachineType
22
 
        {
23
 
            axis2_char_t* property_name;
24
 
 
25
 
 
26
 
                axis2_bool_t is_valid_name;
27
 
 
28
 
 
29
 
            int property_memory;
30
 
 
31
 
 
32
 
                axis2_bool_t is_valid_memory;
33
 
 
34
 
 
35
 
            int property_cores;
36
 
 
37
 
 
38
 
                axis2_bool_t is_valid_cores;
39
 
 
40
 
 
41
 
            int property_disk;
42
 
 
43
 
 
44
 
                axis2_bool_t is_valid_disk;
45
 
 
46
 
 
47
 
 
48
 
        };
49
 
 
50
 
 
51
 
       /************************* Private Function prototypes ********************************/
52
 
 
53
 
 
54
 
                axis2_status_t AXIS2_CALL
55
 
                adb_virtualMachineType_set_name_nil(
56
 
                        adb_virtualMachineType_t* _virtualMachineType,
57
 
                        const axutil_env_t *env);
58
 
 
59
 
 
60
 
                axis2_status_t AXIS2_CALL
61
 
                adb_virtualMachineType_set_memory_nil(
62
 
                        adb_virtualMachineType_t* _virtualMachineType,
63
 
                        const axutil_env_t *env);
64
 
 
65
 
 
66
 
                axis2_status_t AXIS2_CALL
67
 
                adb_virtualMachineType_set_cores_nil(
68
 
                        adb_virtualMachineType_t* _virtualMachineType,
69
 
                        const axutil_env_t *env);
70
 
 
71
 
 
72
 
                axis2_status_t AXIS2_CALL
73
 
                adb_virtualMachineType_set_disk_nil(
74
 
                        adb_virtualMachineType_t* _virtualMachineType,
75
 
                        const axutil_env_t *env);
76
 
 
77
 
 
78
 
 
79
 
       /************************* Function Implmentations ********************************/
80
 
        adb_virtualMachineType_t* AXIS2_CALL
81
 
        adb_virtualMachineType_create(
82
 
            const axutil_env_t *env)
83
 
        {
84
 
            adb_virtualMachineType_t *_virtualMachineType = NULL;
85
 
 
86
 
            AXIS2_ENV_CHECK(env, NULL);
87
 
 
88
 
            _virtualMachineType = (adb_virtualMachineType_t *) AXIS2_MALLOC(env->
89
 
                allocator, sizeof(adb_virtualMachineType_t));
90
 
 
91
 
            if(NULL == _virtualMachineType)
92
 
            {
93
 
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
94
 
                return NULL;
95
 
            }
96
 
 
97
 
            memset(_virtualMachineType, 0, sizeof(adb_virtualMachineType_t));
98
 
 
99
 
            _virtualMachineType->property_name  = NULL;
100
 
                  _virtualMachineType->is_valid_name  = AXIS2_FALSE;
101
 
            _virtualMachineType->is_valid_memory  = AXIS2_FALSE;
102
 
            _virtualMachineType->is_valid_cores  = AXIS2_FALSE;
103
 
            _virtualMachineType->is_valid_disk  = AXIS2_FALSE;
104
 
 
105
 
 
106
 
            return _virtualMachineType;
107
 
        }
108
 
 
109
 
        axis2_status_t AXIS2_CALL
110
 
        adb_virtualMachineType_free (
111
 
                adb_virtualMachineType_t* _virtualMachineType,
112
 
                const axutil_env_t *env)
113
 
        {
114
 
 
115
 
 
116
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
117
 
            AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
118
 
 
119
 
            adb_virtualMachineType_reset_name(_virtualMachineType, env);
120
 
            adb_virtualMachineType_reset_memory(_virtualMachineType, env);
121
 
            adb_virtualMachineType_reset_cores(_virtualMachineType, env);
122
 
            adb_virtualMachineType_reset_disk(_virtualMachineType, env);
123
 
 
124
 
 
125
 
            if(_virtualMachineType)
126
 
            {
127
 
                AXIS2_FREE(env->allocator, _virtualMachineType);
128
 
                _virtualMachineType = NULL;
129
 
            }
130
 
            return AXIS2_SUCCESS;
131
 
        }
132
 
 
133
 
 
134
 
 
135
 
 
136
 
        axis2_status_t AXIS2_CALL
137
 
        adb_virtualMachineType_deserialize(
138
 
                adb_virtualMachineType_t* _virtualMachineType,
139
 
                const axutil_env_t *env,
140
 
                axiom_node_t **dp_parent,
141
 
                axis2_bool_t *dp_is_early_node_valid,
142
 
                axis2_bool_t dont_care_minoccurs)
143
 
        {
144
 
          axiom_node_t *parent = *dp_parent;
145
 
 
146
 
          axis2_status_t status = AXIS2_SUCCESS;
147
 
 
148
 
             axis2_char_t* text_value = NULL;
149
 
             axutil_qname_t *qname = NULL;
150
 
 
151
 
            axutil_qname_t *element_qname = NULL;
152
 
 
153
 
               axiom_node_t *first_node = NULL;
154
 
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
155
 
               axiom_node_t *current_node = NULL;
156
 
               axiom_element_t *current_element = NULL;
157
 
 
158
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
159
 
            AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
160
 
 
161
 
 
162
 
 
163
 
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
164
 
              {
165
 
                  parent = axiom_node_get_next_sibling(parent, env);
166
 
              }
167
 
              if (NULL == parent)
168
 
              {
169
 
                /* This should be checked before everything */
170
 
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
171
 
                            "Failed in building adb object for virtualMachineType : "
172
 
                            "NULL elemenet can not be passed to deserialize");
173
 
                return AXIS2_FAILURE;
174
 
              }
175
 
 
176
 
 
177
 
                      first_node = axiom_node_get_first_child(parent, env);
178
 
 
179
 
 
180
 
 
181
 
 
182
 
                     /*
183
 
                      * building name element
184
 
                      */
185
 
 
186
 
 
187
 
 
188
 
                                   current_node = first_node;
189
 
                                   is_early_node_valid = AXIS2_FALSE;
190
 
 
191
 
 
192
 
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
193
 
                                    {
194
 
                                        current_node = axiom_node_get_next_sibling(current_node, env);
195
 
                                    }
196
 
                                    if(current_node != NULL)
197
 
                                    {
198
 
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
199
 
                                        qname = axiom_element_get_qname(current_element, env, current_node);
200
 
                                    }
201
 
 
202
 
                                 element_qname = axutil_qname_create(env, "name", "http://eucalyptus.ucsb.edu/", NULL);
203
 
 
204
 
 
205
 
                           if (
206
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
207
 
                           {
208
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
209
 
                              {
210
 
                                is_early_node_valid = AXIS2_TRUE;
211
 
                              }
212
 
 
213
 
 
214
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
215
 
                                      if(text_value != NULL)
216
 
                                      {
217
 
                                            status = adb_virtualMachineType_set_name(_virtualMachineType, env,
218
 
                                                               text_value);
219
 
                                      }
220
 
 
221
 
                                      else
222
 
                                      {
223
 
                                            /*
224
 
                                             * axis2_qname_t *qname = NULL;
225
 
                                             * axiom_attribute_t *the_attri = NULL;
226
 
                                             *
227
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
228
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
229
 
                                             */
230
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
231
 
 
232
 
                                            axiom_attribute_t *the_attri = NULL;
233
 
                                            axis2_char_t *attrib_text = NULL;
234
 
                                            axutil_hash_t *attribute_hash = NULL;
235
 
 
236
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
237
 
 
238
 
                                            attrib_text = NULL;
239
 
                                            if(attribute_hash)
240
 
                                            {
241
 
                                                 axutil_hash_index_t *hi;
242
 
                                                 void *val;
243
 
                                                 const void *key;
244
 
 
245
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
246
 
                                                 {
247
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
248
 
 
249
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
250
 
                                                     {
251
 
                                                         the_attri = (axiom_attribute_t*)val;
252
 
                                                         break;
253
 
                                                     }
254
 
                                                 }
255
 
                                            }
256
 
 
257
 
                                            if(the_attri)
258
 
                                            {
259
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
260
 
                                            }
261
 
                                            else
262
 
                                            {
263
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
264
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
265
 
                                            }
266
 
 
267
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
268
 
                                            {
269
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element name");
270
 
                                                status = AXIS2_FAILURE;
271
 
                                            }
272
 
                                            else
273
 
                                            {
274
 
                                                /* after all, we found this is a empty string */
275
 
                                                status = adb_virtualMachineType_set_name(_virtualMachineType, env,
276
 
                                                                   "");
277
 
                                            }
278
 
                                      }
279
 
 
280
 
                                 if(AXIS2_FAILURE ==  status)
281
 
                                 {
282
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for name ");
283
 
                                     if(element_qname)
284
 
                                     {
285
 
                                         axutil_qname_free(element_qname, env);
286
 
                                     }
287
 
                                     return AXIS2_FAILURE;
288
 
                                 }
289
 
                              }
290
 
 
291
 
                  if(element_qname)
292
 
                  {
293
 
                     axutil_qname_free(element_qname, env);
294
 
                     element_qname = NULL;
295
 
                  }
296
 
 
297
 
 
298
 
 
299
 
                     /*
300
 
                      * building memory element
301
 
                      */
302
 
 
303
 
 
304
 
 
305
 
                                    /*
306
 
                                     * because elements are ordered this works fine
307
 
                                     */
308
 
 
309
 
 
310
 
                                   if(current_node != NULL && is_early_node_valid)
311
 
                                   {
312
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
313
 
 
314
 
 
315
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
316
 
                                        {
317
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
318
 
                                        }
319
 
                                        if(current_node != NULL)
320
 
                                        {
321
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
322
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
323
 
                                        }
324
 
 
325
 
                                   }
326
 
                                   is_early_node_valid = AXIS2_FALSE;
327
 
 
328
 
                                 element_qname = axutil_qname_create(env, "memory", "http://eucalyptus.ucsb.edu/", NULL);
329
 
 
330
 
 
331
 
                           if (
332
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
333
 
                           {
334
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
335
 
                              {
336
 
                                is_early_node_valid = AXIS2_TRUE;
337
 
                              }
338
 
 
339
 
 
340
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
341
 
                                      if(text_value != NULL)
342
 
                                      {
343
 
                                            status = adb_virtualMachineType_set_memory(_virtualMachineType, env,
344
 
                                                                   atoi(text_value));
345
 
                                      }
346
 
 
347
 
                                      else
348
 
                                      {
349
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element memory");
350
 
                                          status = AXIS2_FAILURE;
351
 
                                      }
352
 
 
353
 
                                 if(AXIS2_FAILURE ==  status)
354
 
                                 {
355
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for memory ");
356
 
                                     if(element_qname)
357
 
                                     {
358
 
                                         axutil_qname_free(element_qname, env);
359
 
                                     }
360
 
                                     return AXIS2_FAILURE;
361
 
                                 }
362
 
                              }
363
 
 
364
 
                  if(element_qname)
365
 
                  {
366
 
                     axutil_qname_free(element_qname, env);
367
 
                     element_qname = NULL;
368
 
                  }
369
 
 
370
 
 
371
 
 
372
 
                     /*
373
 
                      * building cores element
374
 
                      */
375
 
 
376
 
 
377
 
 
378
 
                                    /*
379
 
                                     * because elements are ordered this works fine
380
 
                                     */
381
 
 
382
 
 
383
 
                                   if(current_node != NULL && is_early_node_valid)
384
 
                                   {
385
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
386
 
 
387
 
 
388
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
389
 
                                        {
390
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
391
 
                                        }
392
 
                                        if(current_node != NULL)
393
 
                                        {
394
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
395
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
396
 
                                        }
397
 
 
398
 
                                   }
399
 
                                   is_early_node_valid = AXIS2_FALSE;
400
 
 
401
 
                                 element_qname = axutil_qname_create(env, "cores", "http://eucalyptus.ucsb.edu/", NULL);
402
 
 
403
 
 
404
 
                           if (
405
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
406
 
                           {
407
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
408
 
                              {
409
 
                                is_early_node_valid = AXIS2_TRUE;
410
 
                              }
411
 
 
412
 
 
413
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
414
 
                                      if(text_value != NULL)
415
 
                                      {
416
 
                                            status = adb_virtualMachineType_set_cores(_virtualMachineType, env,
417
 
                                                                   atoi(text_value));
418
 
                                      }
419
 
 
420
 
                                      else
421
 
                                      {
422
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element cores");
423
 
                                          status = AXIS2_FAILURE;
424
 
                                      }
425
 
 
426
 
                                 if(AXIS2_FAILURE ==  status)
427
 
                                 {
428
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for cores ");
429
 
                                     if(element_qname)
430
 
                                     {
431
 
                                         axutil_qname_free(element_qname, env);
432
 
                                     }
433
 
                                     return AXIS2_FAILURE;
434
 
                                 }
435
 
                              }
436
 
 
437
 
                  if(element_qname)
438
 
                  {
439
 
                     axutil_qname_free(element_qname, env);
440
 
                     element_qname = NULL;
441
 
                  }
442
 
 
443
 
 
444
 
 
445
 
                     /*
446
 
                      * building disk element
447
 
                      */
448
 
 
449
 
 
450
 
 
451
 
                                    /*
452
 
                                     * because elements are ordered this works fine
453
 
                                     */
454
 
 
455
 
 
456
 
                                   if(current_node != NULL && is_early_node_valid)
457
 
                                   {
458
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
459
 
 
460
 
 
461
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
462
 
                                        {
463
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
464
 
                                        }
465
 
                                        if(current_node != NULL)
466
 
                                        {
467
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
468
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
469
 
                                        }
470
 
 
471
 
                                   }
472
 
                                   is_early_node_valid = AXIS2_FALSE;
473
 
 
474
 
                                 element_qname = axutil_qname_create(env, "disk", "http://eucalyptus.ucsb.edu/", NULL);
475
 
 
476
 
 
477
 
                           if (
478
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
479
 
                           {
480
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
481
 
                              {
482
 
                                is_early_node_valid = AXIS2_TRUE;
483
 
                              }
484
 
 
485
 
 
486
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
487
 
                                      if(text_value != NULL)
488
 
                                      {
489
 
                                            status = adb_virtualMachineType_set_disk(_virtualMachineType, env,
490
 
                                                                   atoi(text_value));
491
 
                                      }
492
 
 
493
 
                                      else
494
 
                                      {
495
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element disk");
496
 
                                          status = AXIS2_FAILURE;
497
 
                                      }
498
 
 
499
 
                                 if(AXIS2_FAILURE ==  status)
500
 
                                 {
501
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for disk ");
502
 
                                     if(element_qname)
503
 
                                     {
504
 
                                         axutil_qname_free(element_qname, env);
505
 
                                     }
506
 
                                     return AXIS2_FAILURE;
507
 
                                 }
508
 
                              }
509
 
 
510
 
                  if(element_qname)
511
 
                  {
512
 
                     axutil_qname_free(element_qname, env);
513
 
                     element_qname = NULL;
514
 
                  }
515
 
 
516
 
          return status;
517
 
       }
518
 
 
519
 
          axis2_bool_t AXIS2_CALL
520
 
          adb_virtualMachineType_is_particle()
521
 
          {
522
 
 
523
 
                 return AXIS2_FALSE;
524
 
 
525
 
          }
526
 
 
527
 
 
528
 
          void AXIS2_CALL
529
 
          adb_virtualMachineType_declare_parent_namespaces(
530
 
                    adb_virtualMachineType_t* _virtualMachineType,
531
 
                    const axutil_env_t *env, axiom_element_t *parent_element,
532
 
                    axutil_hash_t *namespaces, int *next_ns_index)
533
 
          {
534
 
 
535
 
                  /* Here this is an empty function, Nothing to declare */
536
 
 
537
 
          }
538
 
 
539
 
 
540
 
 
541
 
        axiom_node_t* AXIS2_CALL
542
 
        adb_virtualMachineType_serialize(
543
 
                adb_virtualMachineType_t* _virtualMachineType,
544
 
                const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
545
 
        {
546
 
 
547
 
 
548
 
             axis2_char_t *string_to_stream;
549
 
 
550
 
 
551
 
         axiom_node_t *current_node = NULL;
552
 
         int tag_closed = 0;
553
 
 
554
 
 
555
 
 
556
 
                axiom_namespace_t *ns1 = NULL;
557
 
 
558
 
                axis2_char_t *qname_uri = NULL;
559
 
                axis2_char_t *qname_prefix = NULL;
560
 
                axis2_char_t *p_prefix = NULL;
561
 
                axis2_bool_t ns_already_defined;
562
 
 
563
 
                    axis2_char_t *text_value_1;
564
 
                    axis2_char_t *text_value_1_temp;
565
 
 
566
 
                    axis2_char_t text_value_2[64];
567
 
 
568
 
                    axis2_char_t text_value_3[64];
569
 
 
570
 
                    axis2_char_t text_value_4[64];
571
 
 
572
 
               axis2_char_t *start_input_str = NULL;
573
 
               axis2_char_t *end_input_str = NULL;
574
 
               unsigned int start_input_str_len = 0;
575
 
               unsigned int end_input_str_len = 0;
576
 
 
577
 
 
578
 
               axiom_data_source_t *data_source = NULL;
579
 
               axutil_stream_t *stream = NULL;
580
 
 
581
 
 
582
 
 
583
 
            AXIS2_ENV_CHECK(env, NULL);
584
 
            AXIS2_PARAM_CHECK(env->error, _virtualMachineType, NULL);
585
 
 
586
 
 
587
 
                    current_node = parent;
588
 
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
589
 
                    if (!data_source)
590
 
                        return NULL;
591
 
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
592
 
                    if (!stream)
593
 
                        return NULL;
594
 
 
595
 
            if(!parent_tag_closed)
596
 
            {
597
 
 
598
 
              string_to_stream = ">";
599
 
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
600
 
              tag_closed = 1;
601
 
 
602
 
            }
603
 
 
604
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
605
 
                       {
606
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
607
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
608
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
609
 
 
610
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
611
 
                                            "http://eucalyptus.ucsb.edu/",
612
 
                                            p_prefix));
613
 
                       }
614
 
 
615
 
 
616
 
                   if (!_virtualMachineType->is_valid_name)
617
 
                   {
618
 
 
619
 
                           /* no need to complain for minoccurs=0 element */
620
 
 
621
 
 
622
 
                   }
623
 
                   else
624
 
                   {
625
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
626
 
                                 (4 + axutil_strlen(p_prefix) +
627
 
                                  axutil_strlen("name")));
628
 
 
629
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
630
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
631
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("name")));
632
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
633
 
 
634
 
 
635
 
 
636
 
 
637
 
 
638
 
 
639
 
                     /*
640
 
                      * parsing name element
641
 
                      */
642
 
 
643
 
 
644
 
 
645
 
                            sprintf(start_input_str, "<%s%sname>",
646
 
                                 p_prefix?p_prefix:"",
647
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
648
 
 
649
 
                        start_input_str_len = axutil_strlen(start_input_str);
650
 
                        sprintf(end_input_str, "</%s%sname>",
651
 
                                 p_prefix?p_prefix:"",
652
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
653
 
                        end_input_str_len = axutil_strlen(end_input_str);
654
 
 
655
 
                           text_value_1 = _virtualMachineType->property_name;
656
 
 
657
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
658
 
 
659
 
 
660
 
                           text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
661
 
                           if (text_value_1_temp)
662
 
                           {
663
 
                               axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));
664
 
                               AXIS2_FREE(env->allocator, text_value_1_temp);
665
 
                           }
666
 
                           else
667
 
                           {
668
 
                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
669
 
                           }
670
 
 
671
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
672
 
 
673
 
 
674
 
                     AXIS2_FREE(env->allocator,start_input_str);
675
 
                     AXIS2_FREE(env->allocator,end_input_str);
676
 
                 }
677
 
 
678
 
 
679
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
680
 
                       {
681
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
682
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
683
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
684
 
 
685
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
686
 
                                            "http://eucalyptus.ucsb.edu/",
687
 
                                            p_prefix));
688
 
                       }
689
 
 
690
 
 
691
 
                   if (!_virtualMachineType->is_valid_memory)
692
 
                   {
693
 
 
694
 
                           /* no need to complain for minoccurs=0 element */
695
 
 
696
 
 
697
 
                   }
698
 
                   else
699
 
                   {
700
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
701
 
                                 (4 + axutil_strlen(p_prefix) +
702
 
                                  axutil_strlen("memory")));
703
 
 
704
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
705
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
706
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("memory")));
707
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
708
 
 
709
 
 
710
 
 
711
 
 
712
 
 
713
 
 
714
 
                     /*
715
 
                      * parsing memory element
716
 
                      */
717
 
 
718
 
 
719
 
 
720
 
                            sprintf(start_input_str, "<%s%smemory>",
721
 
                                 p_prefix?p_prefix:"",
722
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
723
 
 
724
 
                        start_input_str_len = axutil_strlen(start_input_str);
725
 
                        sprintf(end_input_str, "</%s%smemory>",
726
 
                                 p_prefix?p_prefix:"",
727
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
728
 
                        end_input_str_len = axutil_strlen(end_input_str);
729
 
 
730
 
                               sprintf (text_value_2, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _virtualMachineType->property_memory);
731
 
 
732
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
733
 
 
734
 
                           axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
735
 
 
736
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
737
 
 
738
 
 
739
 
                     AXIS2_FREE(env->allocator,start_input_str);
740
 
                     AXIS2_FREE(env->allocator,end_input_str);
741
 
                 }
742
 
 
743
 
 
744
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
745
 
                       {
746
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
747
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
748
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
749
 
 
750
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
751
 
                                            "http://eucalyptus.ucsb.edu/",
752
 
                                            p_prefix));
753
 
                       }
754
 
 
755
 
 
756
 
                   if (!_virtualMachineType->is_valid_cores)
757
 
                   {
758
 
 
759
 
                           /* no need to complain for minoccurs=0 element */
760
 
 
761
 
 
762
 
                   }
763
 
                   else
764
 
                   {
765
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
766
 
                                 (4 + axutil_strlen(p_prefix) +
767
 
                                  axutil_strlen("cores")));
768
 
 
769
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
770
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
771
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("cores")));
772
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
773
 
 
774
 
 
775
 
 
776
 
 
777
 
 
778
 
 
779
 
                     /*
780
 
                      * parsing cores element
781
 
                      */
782
 
 
783
 
 
784
 
 
785
 
                            sprintf(start_input_str, "<%s%scores>",
786
 
                                 p_prefix?p_prefix:"",
787
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
788
 
 
789
 
                        start_input_str_len = axutil_strlen(start_input_str);
790
 
                        sprintf(end_input_str, "</%s%scores>",
791
 
                                 p_prefix?p_prefix:"",
792
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
793
 
                        end_input_str_len = axutil_strlen(end_input_str);
794
 
 
795
 
                               sprintf (text_value_3, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _virtualMachineType->property_cores);
796
 
 
797
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
798
 
 
799
 
                           axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
800
 
 
801
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
802
 
 
803
 
 
804
 
                     AXIS2_FREE(env->allocator,start_input_str);
805
 
                     AXIS2_FREE(env->allocator,end_input_str);
806
 
                 }
807
 
 
808
 
 
809
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
810
 
                       {
811
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
812
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
813
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
814
 
 
815
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
816
 
                                            "http://eucalyptus.ucsb.edu/",
817
 
                                            p_prefix));
818
 
                       }
819
 
 
820
 
 
821
 
                   if (!_virtualMachineType->is_valid_disk)
822
 
                   {
823
 
 
824
 
                           /* no need to complain for minoccurs=0 element */
825
 
 
826
 
 
827
 
                   }
828
 
                   else
829
 
                   {
830
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
831
 
                                 (4 + axutil_strlen(p_prefix) +
832
 
                                  axutil_strlen("disk")));
833
 
 
834
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
835
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
836
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("disk")));
837
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
838
 
 
839
 
 
840
 
 
841
 
 
842
 
 
843
 
 
844
 
                     /*
845
 
                      * parsing disk element
846
 
                      */
847
 
 
848
 
 
849
 
 
850
 
                            sprintf(start_input_str, "<%s%sdisk>",
851
 
                                 p_prefix?p_prefix:"",
852
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
853
 
 
854
 
                        start_input_str_len = axutil_strlen(start_input_str);
855
 
                        sprintf(end_input_str, "</%s%sdisk>",
856
 
                                 p_prefix?p_prefix:"",
857
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
858
 
                        end_input_str_len = axutil_strlen(end_input_str);
859
 
 
860
 
                               sprintf (text_value_4, AXIS2_PRINTF_INT32_FORMAT_SPECIFIER, _virtualMachineType->property_disk);
861
 
 
862
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
863
 
 
864
 
                           axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
865
 
 
866
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
867
 
 
868
 
 
869
 
                     AXIS2_FREE(env->allocator,start_input_str);
870
 
                     AXIS2_FREE(env->allocator,end_input_str);
871
 
                 }
872
 
 
873
 
 
874
 
 
875
 
            return parent;
876
 
        }
877
 
 
878
 
 
879
 
 
880
 
 
881
 
            /**
882
 
             * getter for name.
883
 
             */
884
 
            axis2_char_t* AXIS2_CALL
885
 
            adb_virtualMachineType_get_name(
886
 
                    adb_virtualMachineType_t* _virtualMachineType,
887
 
                    const axutil_env_t *env)
888
 
             {
889
 
 
890
 
                    AXIS2_ENV_CHECK(env, NULL);
891
 
                    AXIS2_PARAM_CHECK(env->error, _virtualMachineType, NULL);
892
 
 
893
 
 
894
 
                return _virtualMachineType->property_name;
895
 
             }
896
 
 
897
 
            /**
898
 
             * setter for name
899
 
             */
900
 
            axis2_status_t AXIS2_CALL
901
 
            adb_virtualMachineType_set_name(
902
 
                    adb_virtualMachineType_t* _virtualMachineType,
903
 
                    const axutil_env_t *env,
904
 
                    const axis2_char_t*  arg_name)
905
 
             {
906
 
 
907
 
 
908
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
909
 
                AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
910
 
 
911
 
                if(_virtualMachineType->is_valid_name &&
912
 
                        arg_name == _virtualMachineType->property_name)
913
 
                {
914
 
 
915
 
                    return AXIS2_SUCCESS;
916
 
                }
917
 
 
918
 
                adb_virtualMachineType_reset_name(_virtualMachineType, env);
919
 
 
920
 
 
921
 
                if(NULL == arg_name)
922
 
                {
923
 
                    /* We are already done */
924
 
                    return AXIS2_SUCCESS;
925
 
                }
926
 
                _virtualMachineType->property_name = (axis2_char_t *)axutil_strdup(env, arg_name);
927
 
                        if(NULL == _virtualMachineType->property_name)
928
 
                        {
929
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for name");
930
 
                            return AXIS2_FAILURE;
931
 
                        }
932
 
                        _virtualMachineType->is_valid_name = AXIS2_TRUE;
933
 
 
934
 
                return AXIS2_SUCCESS;
935
 
             }
936
 
 
937
 
 
938
 
 
939
 
           /**
940
 
            * resetter for name
941
 
            */
942
 
           axis2_status_t AXIS2_CALL
943
 
           adb_virtualMachineType_reset_name(
944
 
                   adb_virtualMachineType_t* _virtualMachineType,
945
 
                   const axutil_env_t *env)
946
 
           {
947
 
               int i = 0;
948
 
               int count = 0;
949
 
               void *element = NULL;
950
 
 
951
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
952
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
953
 
 
954
 
 
955
 
 
956
 
 
957
 
 
958
 
                if(_virtualMachineType->property_name != NULL)
959
 
                {
960
 
 
961
 
 
962
 
                        AXIS2_FREE(env-> allocator, _virtualMachineType->property_name);
963
 
                     _virtualMachineType->property_name = NULL;
964
 
                }
965
 
 
966
 
 
967
 
 
968
 
                _virtualMachineType->is_valid_name = AXIS2_FALSE;
969
 
               return AXIS2_SUCCESS;
970
 
           }
971
 
 
972
 
           /**
973
 
            * Check whether name is nill
974
 
            */
975
 
           axis2_bool_t AXIS2_CALL
976
 
           adb_virtualMachineType_is_name_nil(
977
 
                   adb_virtualMachineType_t* _virtualMachineType,
978
 
                   const axutil_env_t *env)
979
 
           {
980
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
981
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_TRUE);
982
 
 
983
 
               return !_virtualMachineType->is_valid_name;
984
 
           }
985
 
 
986
 
           /**
987
 
            * Set name to nill (currently the same as reset)
988
 
            */
989
 
           axis2_status_t AXIS2_CALL
990
 
           adb_virtualMachineType_set_name_nil(
991
 
                   adb_virtualMachineType_t* _virtualMachineType,
992
 
                   const axutil_env_t *env)
993
 
           {
994
 
               return adb_virtualMachineType_reset_name(_virtualMachineType, env);
995
 
           }
996
 
 
997
 
 
998
 
 
999
 
            /**
1000
 
             * getter for memory.
1001
 
             */
1002
 
            int AXIS2_CALL
1003
 
            adb_virtualMachineType_get_memory(
1004
 
                    adb_virtualMachineType_t* _virtualMachineType,
1005
 
                    const axutil_env_t *env)
1006
 
             {
1007
 
 
1008
 
                    AXIS2_ENV_CHECK(env, (int)0);
1009
 
                    AXIS2_PARAM_CHECK(env->error, _virtualMachineType, (int)0);
1010
 
 
1011
 
 
1012
 
                return _virtualMachineType->property_memory;
1013
 
             }
1014
 
 
1015
 
            /**
1016
 
             * setter for memory
1017
 
             */
1018
 
            axis2_status_t AXIS2_CALL
1019
 
            adb_virtualMachineType_set_memory(
1020
 
                    adb_virtualMachineType_t* _virtualMachineType,
1021
 
                    const axutil_env_t *env,
1022
 
                    const int  arg_memory)
1023
 
             {
1024
 
 
1025
 
 
1026
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1027
 
                AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1028
 
 
1029
 
                if(_virtualMachineType->is_valid_memory &&
1030
 
                        arg_memory == _virtualMachineType->property_memory)
1031
 
                {
1032
 
 
1033
 
                    return AXIS2_SUCCESS;
1034
 
                }
1035
 
 
1036
 
                adb_virtualMachineType_reset_memory(_virtualMachineType, env);
1037
 
 
1038
 
                _virtualMachineType->property_memory = arg_memory;
1039
 
                        _virtualMachineType->is_valid_memory = AXIS2_TRUE;
1040
 
 
1041
 
                return AXIS2_SUCCESS;
1042
 
             }
1043
 
 
1044
 
 
1045
 
 
1046
 
           /**
1047
 
            * resetter for memory
1048
 
            */
1049
 
           axis2_status_t AXIS2_CALL
1050
 
           adb_virtualMachineType_reset_memory(
1051
 
                   adb_virtualMachineType_t* _virtualMachineType,
1052
 
                   const axutil_env_t *env)
1053
 
           {
1054
 
               int i = 0;
1055
 
               int count = 0;
1056
 
               void *element = NULL;
1057
 
 
1058
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1059
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1060
 
 
1061
 
 
1062
 
               _virtualMachineType->is_valid_memory = AXIS2_FALSE;
1063
 
               return AXIS2_SUCCESS;
1064
 
           }
1065
 
 
1066
 
           /**
1067
 
            * Check whether memory is nill
1068
 
            */
1069
 
           axis2_bool_t AXIS2_CALL
1070
 
           adb_virtualMachineType_is_memory_nil(
1071
 
                   adb_virtualMachineType_t* _virtualMachineType,
1072
 
                   const axutil_env_t *env)
1073
 
           {
1074
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1075
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_TRUE);
1076
 
 
1077
 
               return !_virtualMachineType->is_valid_memory;
1078
 
           }
1079
 
 
1080
 
           /**
1081
 
            * Set memory to nill (currently the same as reset)
1082
 
            */
1083
 
           axis2_status_t AXIS2_CALL
1084
 
           adb_virtualMachineType_set_memory_nil(
1085
 
                   adb_virtualMachineType_t* _virtualMachineType,
1086
 
                   const axutil_env_t *env)
1087
 
           {
1088
 
               return adb_virtualMachineType_reset_memory(_virtualMachineType, env);
1089
 
           }
1090
 
 
1091
 
 
1092
 
 
1093
 
            /**
1094
 
             * getter for cores.
1095
 
             */
1096
 
            int AXIS2_CALL
1097
 
            adb_virtualMachineType_get_cores(
1098
 
                    adb_virtualMachineType_t* _virtualMachineType,
1099
 
                    const axutil_env_t *env)
1100
 
             {
1101
 
 
1102
 
                    AXIS2_ENV_CHECK(env, (int)0);
1103
 
                    AXIS2_PARAM_CHECK(env->error, _virtualMachineType, (int)0);
1104
 
 
1105
 
 
1106
 
                return _virtualMachineType->property_cores;
1107
 
             }
1108
 
 
1109
 
            /**
1110
 
             * setter for cores
1111
 
             */
1112
 
            axis2_status_t AXIS2_CALL
1113
 
            adb_virtualMachineType_set_cores(
1114
 
                    adb_virtualMachineType_t* _virtualMachineType,
1115
 
                    const axutil_env_t *env,
1116
 
                    const int  arg_cores)
1117
 
             {
1118
 
 
1119
 
 
1120
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1121
 
                AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1122
 
 
1123
 
                if(_virtualMachineType->is_valid_cores &&
1124
 
                        arg_cores == _virtualMachineType->property_cores)
1125
 
                {
1126
 
 
1127
 
                    return AXIS2_SUCCESS;
1128
 
                }
1129
 
 
1130
 
                adb_virtualMachineType_reset_cores(_virtualMachineType, env);
1131
 
 
1132
 
                _virtualMachineType->property_cores = arg_cores;
1133
 
                        _virtualMachineType->is_valid_cores = AXIS2_TRUE;
1134
 
 
1135
 
                return AXIS2_SUCCESS;
1136
 
             }
1137
 
 
1138
 
 
1139
 
 
1140
 
           /**
1141
 
            * resetter for cores
1142
 
            */
1143
 
           axis2_status_t AXIS2_CALL
1144
 
           adb_virtualMachineType_reset_cores(
1145
 
                   adb_virtualMachineType_t* _virtualMachineType,
1146
 
                   const axutil_env_t *env)
1147
 
           {
1148
 
               int i = 0;
1149
 
               int count = 0;
1150
 
               void *element = NULL;
1151
 
 
1152
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1153
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1154
 
 
1155
 
 
1156
 
               _virtualMachineType->is_valid_cores = AXIS2_FALSE;
1157
 
               return AXIS2_SUCCESS;
1158
 
           }
1159
 
 
1160
 
           /**
1161
 
            * Check whether cores is nill
1162
 
            */
1163
 
           axis2_bool_t AXIS2_CALL
1164
 
           adb_virtualMachineType_is_cores_nil(
1165
 
                   adb_virtualMachineType_t* _virtualMachineType,
1166
 
                   const axutil_env_t *env)
1167
 
           {
1168
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1169
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_TRUE);
1170
 
 
1171
 
               return !_virtualMachineType->is_valid_cores;
1172
 
           }
1173
 
 
1174
 
           /**
1175
 
            * Set cores to nill (currently the same as reset)
1176
 
            */
1177
 
           axis2_status_t AXIS2_CALL
1178
 
           adb_virtualMachineType_set_cores_nil(
1179
 
                   adb_virtualMachineType_t* _virtualMachineType,
1180
 
                   const axutil_env_t *env)
1181
 
           {
1182
 
               return adb_virtualMachineType_reset_cores(_virtualMachineType, env);
1183
 
           }
1184
 
 
1185
 
 
1186
 
 
1187
 
            /**
1188
 
             * getter for disk.
1189
 
             */
1190
 
            int AXIS2_CALL
1191
 
            adb_virtualMachineType_get_disk(
1192
 
                    adb_virtualMachineType_t* _virtualMachineType,
1193
 
                    const axutil_env_t *env)
1194
 
             {
1195
 
 
1196
 
                    AXIS2_ENV_CHECK(env, (int)0);
1197
 
                    AXIS2_PARAM_CHECK(env->error, _virtualMachineType, (int)0);
1198
 
 
1199
 
 
1200
 
                return _virtualMachineType->property_disk;
1201
 
             }
1202
 
 
1203
 
            /**
1204
 
             * setter for disk
1205
 
             */
1206
 
            axis2_status_t AXIS2_CALL
1207
 
            adb_virtualMachineType_set_disk(
1208
 
                    adb_virtualMachineType_t* _virtualMachineType,
1209
 
                    const axutil_env_t *env,
1210
 
                    const int  arg_disk)
1211
 
             {
1212
 
 
1213
 
 
1214
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1215
 
                AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1216
 
 
1217
 
                if(_virtualMachineType->is_valid_disk &&
1218
 
                        arg_disk == _virtualMachineType->property_disk)
1219
 
                {
1220
 
 
1221
 
                    return AXIS2_SUCCESS;
1222
 
                }
1223
 
 
1224
 
                adb_virtualMachineType_reset_disk(_virtualMachineType, env);
1225
 
 
1226
 
                _virtualMachineType->property_disk = arg_disk;
1227
 
                        _virtualMachineType->is_valid_disk = AXIS2_TRUE;
1228
 
 
1229
 
                return AXIS2_SUCCESS;
1230
 
             }
1231
 
 
1232
 
 
1233
 
 
1234
 
           /**
1235
 
            * resetter for disk
1236
 
            */
1237
 
           axis2_status_t AXIS2_CALL
1238
 
           adb_virtualMachineType_reset_disk(
1239
 
                   adb_virtualMachineType_t* _virtualMachineType,
1240
 
                   const axutil_env_t *env)
1241
 
           {
1242
 
               int i = 0;
1243
 
               int count = 0;
1244
 
               void *element = NULL;
1245
 
 
1246
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1247
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_FAILURE);
1248
 
 
1249
 
 
1250
 
               _virtualMachineType->is_valid_disk = AXIS2_FALSE;
1251
 
               return AXIS2_SUCCESS;
1252
 
           }
1253
 
 
1254
 
           /**
1255
 
            * Check whether disk is nill
1256
 
            */
1257
 
           axis2_bool_t AXIS2_CALL
1258
 
           adb_virtualMachineType_is_disk_nil(
1259
 
                   adb_virtualMachineType_t* _virtualMachineType,
1260
 
                   const axutil_env_t *env)
1261
 
           {
1262
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1263
 
               AXIS2_PARAM_CHECK(env->error, _virtualMachineType, AXIS2_TRUE);
1264
 
 
1265
 
               return !_virtualMachineType->is_valid_disk;
1266
 
           }
1267
 
 
1268
 
           /**
1269
 
            * Set disk to nill (currently the same as reset)
1270
 
            */
1271
 
           axis2_status_t AXIS2_CALL
1272
 
           adb_virtualMachineType_set_disk_nil(
1273
 
                   adb_virtualMachineType_t* _virtualMachineType,
1274
 
                   const axutil_env_t *env)
1275
 
           {
1276
 
               return adb_virtualMachineType_reset_disk(_virtualMachineType, env);
1277
 
           }
1278
 
 
1279
 
 
1280