You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/05/22 01:02:16 UTC
[1/3] git commit: updated refs/heads/ui-vpc-redesign to d019359
Updated Branches:
refs/heads/ui-vpc-redesign 3c2be57c3 -> d019359d5
PVLAN: Fix NPE when VM are in allocated state
If vlan is not assigned for VM, nic.getBroadcastUri() would be null. Then just
ignore it.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/92ad6aba
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92ad6aba
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92ad6aba
Branch: refs/heads/ui-vpc-redesign
Commit: 92ad6abab0063771dffaabb7c9d6d8256083c5be
Parents: a75cf9a
Author: Sheng Yang <sh...@citrix.com>
Authored: Tue May 21 14:46:31 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Tue May 21 14:51:35 2013 -0700
----------------------------------------------------------------------
.../router/VirtualNetworkApplianceManagerImpl.java | 2 +-
server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92ad6aba/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 64e412a..b969be2 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2609,7 +2609,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
List<? extends Nic> routerNics = _nicDao.listByVmId(profile.getId());
for (Nic nic : routerNics) {
Network network = _networkModel.getNetwork(nic.getNetworkId());
- if (network.getTrafficType() == TrafficType.Guest && nic.getBroadcastUri().getScheme().equals("pvlan")) {
+ if (network.getTrafficType() == TrafficType.Guest && nic.getBroadcastUri() != null && nic.getBroadcastUri().getScheme().equals("pvlan")) {
NicProfile nicProfile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), 0, false, "pvlan-nic");
setupDhcpForPvlan(false, domR, domR.getHostId(), nicProfile);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92ad6aba/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 71b4e3f..5e20656 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -3059,7 +3059,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
for (NicVO nic : nics) {
NetworkVO network = _networkDao.findById(nic.getNetworkId());
if (network.getTrafficType() == TrafficType.Guest) {
- if (nic.getBroadcastUri().getScheme().equals("pvlan")) {
+ if (nic.getBroadcastUri() != null && nic.getBroadcastUri().getScheme().equals("pvlan")) {
NicProfile nicProfile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), 0, false, "pvlan-nic");
setupVmForPvlan(false, vm.getHostId(), nicProfile);
}
[2/3] git commit: updated refs/heads/ui-vpc-redesign to d019359
Posted by bf...@apache.org.
Add base internal LB provider module
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0a443697
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0a443697
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0a443697
Branch: refs/heads/ui-vpc-redesign
Commit: 0a443697ea48d48310a24c5e25a2298522183901
Parents: 92ad6ab
Author: Brian Federle <bf...@gmail.com>
Authored: Tue May 21 15:26:55 2013 -0700
Committer: Brian Federle <bf...@gmail.com>
Committed: Tue May 21 15:26:59 2013 -0700
----------------------------------------------------------------------
.../internalLbProvider/internalLbProvider.js | 182 +++++++++++++++
ui/modules/modules.js | 3 +-
2 files changed, 184 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a443697/ui/modules/internalLbProvider/internalLbProvider.js
----------------------------------------------------------------------
diff --git a/ui/modules/internalLbProvider/internalLbProvider.js b/ui/modules/internalLbProvider/internalLbProvider.js
new file mode 100644
index 0000000..aaa386e
--- /dev/null
+++ b/ui/modules/internalLbProvider/internalLbProvider.js
@@ -0,0 +1,182 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+(function($, cloudStack) {
+ cloudStack.modules.internalLbProvider = function(module) {
+ var internalLbDeviceViewAll = [
+ {
+ label: 'Devices',
+ path: '_zone.internalLbDevices'
+ }
+ ];
+
+ var internalLbListView = {
+ id: 'internalLbDevices',
+ fields: {
+ resourcename: { label: 'Resource Name' },
+ provider: { label: 'Provider' }
+ },
+ dataProvider: function(args) {
+ args.response.success({ data: [] });
+ },
+ actions: {
+ add: {
+ label: 'Add internal LB device',
+
+ messages: {
+ notification: function(args) {
+ return 'Add internal LB device';
+ }
+ },
+
+ createForm: {
+ title: 'Add internal LB device',
+ fields: {
+ hostname: {
+ label: 'label.host',
+ validation: { required: true }
+ },
+ username: {
+ label: 'label.username',
+ validation: { required: true }
+ },
+ password: {
+ label: 'label.password',
+ isPassword: true,
+ validation: { required: true }
+ }
+ }
+ },
+
+ action: function(args) {
+ args.response.success();
+ },
+
+ notification: {
+ poll: function(args) {
+ args.complete();
+ }
+ }
+ }
+ },
+
+ detailView: {
+ name: 'Internal LB resource details',
+ actions: {
+ remove: {
+ label: 'delete Internal LB resource',
+ messages: {
+ confirm: function(args) {
+ return 'Please confirm you want to delete Internal LB resource';
+ },
+ notification: function(args) {
+ return 'delete Internal LB resource';
+ }
+ },
+ action: function(args) {
+ args.response.success();
+ },
+ notification: {
+ poll: function(args) {
+ args.complete();
+ }
+ }
+ }
+ },
+
+ tabs: {
+ details: {
+ title: 'label.details',
+ fields: [
+ {
+ resourcename: { label: 'Resource Name' }
+ },
+ {
+ resourceid: { label: 'Resource ID'},
+ provider: { label: 'Provider' },
+ RESOURCE_NAME: { label: 'Resource Name'}
+ }
+ ],
+ dataProvider: function(args) {
+ args.response.success({ data: args.context.internalLbDevices[0] });
+ }
+ }
+ }
+ }
+ };
+
+ var internalLbProviderDetailView = {
+ id: 'internalLbProvider',
+ label: 'internal LB',
+ viewAll: internalLbDeviceViewAll,
+ tabs: {
+ details: {
+ title: 'label.details',
+ fields: [
+ {
+ name: { label: 'label.name' }
+ },
+ {
+ state: { label: 'label.state' },
+ id: { label: 'label.id' },
+ servicelist: {
+ label: 'Services',
+ converter: function(args){
+ if(args)
+ return args.join(', ');
+ else
+ return '';
+ }
+ }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL('listNetworkServiceProviders'),
+ data: {
+ name: 'InternalLb',
+ physicalnetworkid: args.context.physicalNetworks[0].id
+ },
+ success: function(json){
+ var items = json.listnetworkserviceprovidersresponse.networkserviceprovider;
+ if(items != null && items.length > 0) {
+ args.response.success({ data: items[0] });
+ }
+ else {
+ args.response.success({
+ data: {
+ name: 'InternalLb',
+ state: 'Disabled'
+ }
+ })
+ }
+ }
+ });
+ }
+ }
+ }
+ };
+
+ module.infrastructure.networkServiceProvider({
+ id: 'internalLb',
+ name: 'Internal LB',
+ //state: 'Disabled', //don't know state until log in and visit Infrastructure menu > zone detail > physical network > network service providers
+ listView: internalLbListView,
+
+ detailView: internalLbProviderDetailView
+ });
+ };
+}(jQuery, cloudStack));
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a443697/ui/modules/modules.js
----------------------------------------------------------------------
diff --git a/ui/modules/modules.js b/ui/modules/modules.js
index d4502a1..3170122 100644
--- a/ui/modules/modules.js
+++ b/ui/modules/modules.js
@@ -18,6 +18,7 @@
cloudStack.modules = [
'infrastructure',
'vnmcNetworkProvider',
- 'vnmcAsa1000v'
+ 'vnmcAsa1000v',
+ 'internalLbProvider'
];
}(jQuery, cloudStack));
[3/3] git commit: updated refs/heads/ui-vpc-redesign to d019359
Posted by bf...@apache.org.
Merge branch 'master' into ui-vpc-redesign
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d019359d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d019359d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d019359d
Branch: refs/heads/ui-vpc-redesign
Commit: d019359d59a3b6bb017045727fd21c21d60bad1b
Parents: 3c2be57 0a44369
Author: Brian Federle <bf...@gmail.com>
Authored: Tue May 21 16:02:12 2013 -0700
Committer: Brian Federle <bf...@gmail.com>
Committed: Tue May 21 16:02:12 2013 -0700
----------------------------------------------------------------------
.../router/VirtualNetworkApplianceManagerImpl.java | 2 +-
server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +-
.../internalLbProvider/internalLbProvider.js | 182 +++++++++++++++
ui/modules/modules.js | 3 +-
4 files changed, 186 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d019359d/ui/modules/modules.js
----------------------------------------------------------------------
diff --cc ui/modules/modules.js
index 1e4cd45,3170122..1ff69ef
--- a/ui/modules/modules.js
+++ b/ui/modules/modules.js
@@@ -16,9 -16,9 +16,10 @@@
// under the License.
(function($, cloudStack) {
cloudStack.modules = [
+ 'vpc',
'infrastructure',
'vnmcNetworkProvider',
- 'vnmcAsa1000v'
+ 'vnmcAsa1000v',
+ 'internalLbProvider'
];
}(jQuery, cloudStack));