diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml index b65e9e4d8ae..a001dc2dd9c 100644 --- a/build/build-devcloud.xml +++ b/build/build-devcloud.xml @@ -35,7 +35,7 @@ - + @@ -50,10 +50,10 @@ - + - + @@ -61,38 +61,38 @@ - + - + - + - + - + - + - - + + - + diff --git a/tools/devcloud/devcloudsetup.sh b/tools/devcloud/devcloudsetup.sh index 6d2c156b6c6..f8d78a6447d 100644 --- a/tools/devcloud/devcloudsetup.sh +++ b/tools/devcloud/devcloudsetup.sh @@ -21,13 +21,13 @@ install_xen() { aptitude update echo "install xen" aptitude -y install linux-headers-3.2.0-23-generic-pae - aptitude -y install xen-hypervisor-4.1 xcp-xapi + aptitude -y install xen-hypervisor-4.1-i386 xcp-xapi echo "configure xen" sed -i -e 's/xend_start$/#xend_start/' -e 's/xend_stop$/#xend_stop/' /etc/init.d/xend update-rc.d xendomains disable - sed -i 's/GRUB_DEFAULT=.\+/GRUB_DEFAULT="Xen 4.1-amd64"/' /etc/default/grub + sed -i 's/GRUB_DEFAULT=.\+/GRUB_DEFAULT="Xen 4.1-i386"/' /etc/default/grub echo 'GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=512M,max:512M"' | cat /etc/default/grub - >> /etc/default/newgrub mv /etc/default/newgrub /etc/default/grub update-grub @@ -49,6 +49,8 @@ iface xenbr0 inet dhcp auto eth0 iface eth0 inet dhcp +pre-up iptables-save < /etc/iptables.save +pre-up /etc/init.d/ebtables load EOF echo TOOLSTACK=xapi > /etc/default/xen @@ -68,6 +70,14 @@ postsetup() { print "xen dom0 is not running, make sure dom0 is installed" exit 1 fi + + #disable virtualbox dhcp server for Vms created by cloudstack + apt-get install ebtables + iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill + mac=`ifconfig xenbr0 |grep HWaddr |awk '{print $5}'` + ebtables -I FORWARD -d ! $mac -i eth0 -p IPV4 --ip-prot udp --ip-dport 67:68 -j DROP + iptables-save > /etc/iptables.save + /etc/init.d/ebtables save echo "configure NFS server" aptitude -y install nfs-server diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index f2d1a0d1558..8188a01bf7e 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -6595,6 +6595,11 @@ div.panel.ui-dialog div.list-view div.fixed-header { .multi-edit { } +.multi-edit > form { + position: relative; + clear: both; +} + .multi-edit table.multi-edit { border-top: none; } @@ -6926,6 +6931,34 @@ div.panel.ui-dialog div.list-view div.fixed-header { margin: 0 22px 0 0; } +/** Header fields*/ +.multi-edit .header-fields { + position: relative; + /*+placement:shift 8px 11px;*/ + position: relative; + left: 8px; + top: 11px; +} + +.multi-edit .header-fields .form-item { + margin-bottom: 32px; + float: left; +} + +.multi-edit .header-fields .form-item .name, +.multi-edit .header-fields .form-item .value { + float: left; +} + +.multi-edit .header-fields .form-item .name { + font-size: 14px; + padding: 5px; + color: #55687A; +} + +.multi-edit .header-fields input[type=submit] { +} + /*Security Rules*/ .security-rules .multi-edit input { width: 69px; @@ -9233,6 +9266,34 @@ div.panel.ui-dialog div.list-view div.fixed-header { width: 46px; } +/*VPC: Enable Static NAT fields*/ +.list-view.instances .filters.tier-select { + width: 246px; + /*+border-radius:4px;*/ + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + background: #8F98A1; + padding: 2px 20px 2px 13px; + margin: 1px 120px 0 19px; + border: 1px solid #000000; +} + +.list-view.instances .filters.tier-select label { + color: #FFFFFF; + /*+text-shadow:0px 1px 3px #000000;*/ + -moz-text-shadow: 0px 1px 3px #000000; + -webkit-text-shadow: 0px 1px 3px #000000; + -o-text-shadow: 0px 1px 3px #000000; + text-shadow: 0px 1px 3px #000000; +} + +.list-view.instances .filters.tier-select select { + width: 166px; + float: left; +} + /*Configure ACL dialog*/ .ui-dialog.configure-acl { } diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 150ade27846..6699d163d97 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -197,7 +197,7 @@ label: 'label.add.guest.network', preFilter: function(args) { - var basicZoneExists = false; + var basicZoneExists = true; //Modifying the logic behind displaying the tabs depending on the networktype $.ajax({ url: createURL("listZones"), dataType: "json", @@ -206,8 +206,8 @@ if(json.listzonesresponse.zone != null && json.listzonesresponse.zone.length > 0) { zoneObjs = json.listzonesresponse.zone; $(zoneObjs).each(function() { - if(this.networktype == "Basic") { - basicZoneExists = true; + if(this.networktype == "Advanced") { + basicZoneExists = false; // For any occurence of an Advanced zone with any combination of basic zone , the add guest network tab will be displayed return false; //break each loop } }); @@ -1230,9 +1230,28 @@ }, enableStaticNAT: { label: 'label.action.enable.static.NAT', + action: { noAdd: true, custom: cloudStack.uiCustom.enableStaticNAT({ + // VPC + tierSelect: function(args) { + args.$tierSelect.hide(); // Hidden by default + + // Determine if tiers are supported here + var enableTiers = false; + + if (enableTiers) { + args.$tierSelect.show(); + args.response.success({ + data: [ + { id: '1', description: 'VPC 1' }, + { id: '2', description: 'VPC 2' } + ] + }); + } + }, + listView: $.extend(true, {}, cloudStack.sections.instances, { listView: { dataProvider: function(args) { @@ -1949,6 +1968,21 @@ } } }), + headerFields: { + tier: { + label: 'Tier', + select: function(args) { + args.response.success({ + data: [ + { id: '', name: '', description: 'None' }, + { id: '1', name: 'tier1', description: 'tier1' }, + { id: '2', name: 'tier2', description: 'tier2' }, + { id: '3', name: 'tier3', description: 'tier3' } + ] + }); + } + } + }, multipleAdd: true, fields: { 'name': { edit: true, label: 'label.name', isEditable: true }, @@ -1967,6 +2001,7 @@ }); } }, + 'sticky': { label: 'label.stickiness', custom: { @@ -2178,7 +2213,9 @@ } } }, - dataProvider: function(args) { + dataProvider: function(args) { + var $multi = args.$multi; + $.ajax({ url: createURL('listLoadBalancerRules'), data: { @@ -2273,11 +2310,36 @@ }); } }); + + // Check if tiers are present; hide/show header drop-down + var hasTiers = false; + var $headerFields = $multi.find('.header-fields'); + + if (hasTiers) { + $headerFields.hide(); + } else { + $headerFields.show(); + } } }, // Port forwarding rules portForwarding: { + headerFields: { + tier: { + label: 'Tier', + select: function(args) { + args.response.success({ + data: [ + { id: '', name: '', description: 'None' }, + { id: '1', name: 'tier1', description: 'tier1' }, + { id: '2', name: 'tier2', description: 'tier2' }, + { id: '3', name: 'tier3', description: 'tier3' } + ] + }); + } + } + }, listView: $.extend(true, {}, cloudStack.sections.instances, { listView: { dataProvider: function(args) { @@ -2413,6 +2475,8 @@ } }, dataProvider: function(args) { + var $multi = args.$multi; + $.ajax({ url: createURL('listPortForwardingRules'), data: { @@ -2464,6 +2528,16 @@ } }); }); + + // Check if tiers are present; hide/show header drop-down + var hasTiers = false; + var $headerFields = $multi.find('.header-fields'); + + if (hasTiers) { + $headerFields.hide(); + } else { + $headerFields.show(); + } }, error: function(data) { args.response.error(parseXMLHttpResponse(data)); diff --git a/ui/scripts/ui-custom/enableStaticNAT.js b/ui/scripts/ui-custom/enableStaticNAT.js index ad4fbc46825..67a54e16ed6 100644 --- a/ui/scripts/ui-custom/enableStaticNAT.js +++ b/ui/scripts/ui-custom/enableStaticNAT.js @@ -18,6 +18,7 @@ cloudStack.uiCustom.enableStaticNAT = function(args) { var listView = args.listView; var action = args.action; + var tierSelect = args.tierSelect; return function(args) { var context = args.context; @@ -86,6 +87,7 @@ $dataList.fadeOut(function() { action({ + tierID: $dataList.find('.tier-select select').val(), context: $.extend(true, {}, context, { instances: [ $dataList.find('tr.multi-edit-selected').data('json-obj') @@ -124,6 +126,38 @@ } ] }).parent('.ui-dialog').overlay(); + + // Add tier select dialog + if (tierSelect) { + var $toolbar = $dataList.find('.toolbar'); + var $tierSelect = $('
').addClass('filters tier-select').prependTo($toolbar); + var $tierSelectLabel = $('