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

« back to all changes in this revision

Viewing changes to cluster/server-marshal.c

  • 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:
66
66
#include <handlers.h>
67
67
#include <misc.h>
68
68
#include <vnetwork.h>
 
69
#include "adb-helpers.h"
69
70
      
70
71
#define DONOTHING 0
71
72
#define EVENTLOG 0
732
733
  for (i=0; i<vmLen; i++) {
733
734
    char *name;
734
735
    vm = adb_describeResourcesType_get_instanceTypes_at(drt, env, i);
735
 
    name = adb_virtualMachineType_get_name(vm, env);
736
 
    strncpy(vms[i].name, name, 64);
737
 
    vms[i].mem = adb_virtualMachineType_get_memory(vm, env);
738
 
    vms[i].cores = adb_virtualMachineType_get_cores(vm, env);
739
 
    vms[i].disk = adb_virtualMachineType_get_disk(vm, env);
 
736
    copy_vm_type_from_adb (&(vms[i]), vm, env);
740
737
  }
741
738
 
742
739
  // do it
762
759
 
763
760
    for (i=0; i<outTypesLen; i++) {
764
761
      adb_ccResourceType_t *rt=NULL;
765
 
      
766
 
      vm = adb_virtualMachineType_create(env);
767
 
      adb_virtualMachineType_set_memory(vm, env, vms[i].mem);
768
 
      adb_virtualMachineType_set_cores(vm, env, vms[i].cores);
769
 
      adb_virtualMachineType_set_disk(vm, env, vms[i].disk);
770
 
      adb_virtualMachineType_set_name(vm, env, vms[i].name);
 
762
  
 
763
      vm = copy_vm_type_to_adb (env, &(vms[i]));
771
764
 
772
765
      rt = adb_ccResourceType_create(env);
773
766
      adb_ccResourceType_set_instanceType(rt, env, vm);
901
894
    adb_ccInstanceType_add_volumes(dst, env, vol);
902
895
  }
903
896
 
904
 
  adb_ccInstanceType_set_networkIndex(dst, env, src->networkIndex);
905
 
 
906
897
  netconf = adb_netConfigType_create(env);
907
898
  adb_netConfigType_set_privateMacAddress(netconf, env, src->ccnet.privateMac);
908
 
  adb_netConfigType_set_publicMacAddress(netconf, env, src->ccnet.publicMac);
909
899
  adb_netConfigType_set_privateIp(netconf, env, src->ccnet.privateIp);
910
900
  adb_netConfigType_set_publicIp(netconf, env, src->ccnet.publicIp);
911
901
  adb_netConfigType_set_vlan(netconf, env, src->ccnet.vlan);
 
902
  adb_netConfigType_set_networkIndex(netconf, env, src->ccnet.networkIndex);
912
903
  adb_ccInstanceType_set_netParams(dst, env, netconf);
913
904
  
914
 
  vm = adb_virtualMachineType_create(env);
915
 
  adb_virtualMachineType_set_memory(vm, env, src->ccvm.mem);
916
 
  adb_virtualMachineType_set_cores(vm, env, src->ccvm.cores);
917
 
  adb_virtualMachineType_set_disk(vm, env, src->ccvm.disk);
 
905
  vm = copy_vm_type_to_adb (env, &(src->ccvm));
918
906
  adb_virtualMachineType_set_name(vm, env, src->ccvm.name);
919
907
  adb_ccInstanceType_set_instanceType(dst, env, vm);
920
908
 
938
926
  axis2_bool_t status=AXIS2_TRUE;
939
927
  char statusMessage[256];
940
928
 
941
 
  char *emiId, *keyName, **instIds=NULL, *reservationId, **netNames=NULL, **macAddrs=NULL, *kernelId, *ramdiskId, *emiURL, *kernelURL, *ramdiskURL, *vmName, *userData, *launchIndex;
 
929
  char *emiId, *keyName, **instIds=NULL, *reservationId, **netNames=NULL, **macAddrs=NULL, *kernelId, *ramdiskId, *emiURL, *kernelURL, *ramdiskURL, *vmName, *userData, *launchIndex, *tmp;
942
930
  ncMetadata ccMeta;
943
931
  
944
932
  virtualMachine ccvm;
960
948
  kernelURL = adb_runInstancesType_get_kernelURL(rit, env);
961
949
  ramdiskURL = adb_runInstancesType_get_ramdiskURL(rit, env);
962
950
 
963
 
  userData = adb_runInstancesType_get_userData(rit, env);
 
951
  tmp = adb_runInstancesType_get_userData(rit, env);
 
952
  if (!tmp) {
 
953
    userData = strdup("");
 
954
  } else {
 
955
    userData = strdup(tmp);
 
956
  }
 
957
 
964
958
  launchIndex = adb_runInstancesType_get_launchIndex(rit, env);
965
959
  
966
960
  vm = adb_runInstancesType_get_instanceType(rit, env);
967
 
  ccvm.mem = adb_virtualMachineType_get_memory(vm, env);
968
 
  ccvm.cores = adb_virtualMachineType_get_cores(vm, env);
969
 
  ccvm.disk = adb_virtualMachineType_get_disk(vm, env);
 
961
  copy_vm_type_from_adb (&ccvm, vm, env);
970
962
  vmName = adb_virtualMachineType_get_name(vm, env);
971
963
  snprintf(ccvm.name, 64, "%s", vmName);
972
964
 
1035
1027
  free(macAddrs);
1036
1028
  free(netNames);
1037
1029
  free(instIds);
1038
 
  
 
1030
  free(userData);
 
1031
 
1039
1032
  return(ret);
1040
1033
}
1041
1034