http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf67e584/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
----------------------------------------------------------------------
diff --cc tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
index bdacd6b,d45d482..65294f2
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
@@@ -48,9 -49,9 +49,10 @@@ def describeResources(config)
      pn = physical_network()
      pn.name = "Sandbox-pnet"
      pn.traffictypes = [traffictype("Guest"), traffictype("Management"), 
traffictype("Public")]
+     pn.isolationmethods = ["VLAN"]
      pn.providers.append(vpcprovider)
      pn.vlan = config.get('cloudstack', 'zone.vlan')
 +    pn.isolationmethods = ['VLAN']
      
      z.physical_networks.append(pn)
  

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf67e584/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --cc ui/scripts/accounts.js
index e36852f,bad8435..95f8b3b
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@@ -770,12 -890,62 +771,62 @@@
                                                                                
                                        actionFilter: accountActionfilter,
                                                                                
                                        data: accountObj 
                                                                                
                                }
 -                                                                              
                        );
 +                                                                              
                        );                                                      
                                                                                
                }
 -                                                                              
        });
 +                                                                              
        });                                                                     
                
                                                                                
}
 -                                                                      });
 +                                                                      });     
        
                  }
+               },
+ 
+               // Granular settings for account
+               settings: {
+                 title: 'Settings',
+                 custom: cloudStack.uiCustom.granularSettings({
+                   dataProvider: function(args) {
+                      $.ajax({
+                             url:createURL('listConfigurations&accountid=' + 
args.context.accounts[0].id),
+                              data: { page: args.page, pageSize: pageSize, 
listAll: true },
+                             success:function(json){
+                               args.response.success({
+                                  
data:json.listconfigurationsresponse.configuration
+ 
+                                  });
+ 
+                              },
+ 
+                             error:function(json){
+                               args.response.error(parseXMLHttpResponse(json));
+ 
+                              }
+                        });
+ 
+                   },
+                   actions: {
+                     edit: function(args) {
+                       // call updateAccountLevelParameters
+                        var data = {
+                                  name: args.data.jsonObj.name,
+                                  value: args.data.value
+                                      };
+ 
+                           $.ajax({
+                           url:createURL('updateConfiguration&accountid=' + 
args.context.accounts[0].id),
+                           data:data,
+                           success:function(json){
+                               var item = 
json.updateconfigurationresponse.configuration;
+                               args.response.success({data:item});
+                             },
+ 
+                           error: function(json) {
+                              args.response.error(parseXMLHttpResponse(json));
+                             }
+ 
+                            });
+ 
+                     }
+                   }
+                 })
                }
              }
            }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf67e584/ui/scripts/instances.js
----------------------------------------------------------------------
diff --cc ui/scripts/instances.js
index e44b812,e5d7d14..a8e4c46
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@@ -1434,14 -1428,135 +1428,130 @@@
            nics: {
              title: 'label.nics',
              multiple: true,
+             actions: {
+               add: {
+                 label: 'Add network to VM',
+                 messages: {
+                   confirm: function(args) {
+                     return 'Please confirm that you would like to add a new 
VM NIC for this network.';
+                   },
+                   notification: function(args) {
+                     return 'Add network to VM';
+                   }
+                 },
+                 createForm: {
+                   title: 'Add network to VM',
+                   desc: 'Please specify the network that you would like to 
add this VM to. A new NIC will be added for this network.',
+                   fields: {
+                     networkid: {
+                       label: 'label.network',
+                       select: function(args) {
+                         $.ajax({
+                           url: createURL('listNetworks'),
+                           data: {
+                             listAll: true,
+                             zoneid: args.context.instances[0].zoneid
+                           },
+                           success: function(json) {
+                             args.response.success({
+                               data: $.map(json.listnetworksresponse.network, 
function(network) {
+                                 return {
+                                   id: network.id,
+                                   description: network.name
+                                 };
+                               })
+                             });
+                           }
+                         });
+                       }
+                     }
+                   }
+                 },
+                 action: function(args) {
+                   $.ajax({
+                     url: createURL('addNicToVirtualMachine'),
+                     data: {
+                       virtualmachineid: args.context.instances[0].id,
+                       networkid: args.data.networkid
+                     },
+                     success: function(json) {
+                       args.response.success({
+                         _custom: { jobId: 
json.addnictovirtualmachineresponse.jobid }
+                       });
+                     }
+                   });
+                 },
+                 notification: { poll: pollAsyncJobResult }
+               },
+ 
+               makeDefault: {
+                 label: 'Set default NIC',
+                 messages: {
+                   confirm: function() {
+                     return 'Please confirm that you would like to make this 
NIC the default for this VM.';
+                   },
+                   notification: function(args) {
+                     return 'Set default NIC'
+                   }
+                 },
+                 action: function (args) {
+                   $.ajax({
+                     url: createURL('updateDefaultNicForVirtualMachine'),
+                     data: {
+                       virtualmachineid: args.context.instances[0].id,
+                       nicid: args.context.nics[0].id
+                     },
+                     success: function(json) {
+                       args.response.success({
+                         _custom: { jobId: 
json.updatedefaultnicforvirtualmachineresponse.jobid }
+                       });
+                     }
+                   });
+                 },
+                 notification: {
+                   poll: pollAsyncJobResult
+                 }
+               },
+ 
+               // Remove NIC/Network from VM
+               remove: {
+                 label: 'label.action.delete.nic',
+                 messages: {
+                   confirm: function(args) {
+                     return 'message.action.delete.nic';
+                   },
+                   notification: function(args) {
+                     return 'label.action.delete.nic';
+                   }
+                 },
+                 action: function(args) {
+                   $.ajax({
+                     url: createURL('removeNicFromVirtualMachine'),
+                     data: {
+                       virtualmachineid: args.context.instances[0].id,
+                       nicid: args.context.nics[0].id
+                     },
+                     success: function(json) {
+                       args.response.success({
+                         _custom: { jobId: 
json.removenicfromvirtualmachineresponse.jobid }
+                       })
+                     }
+                   });
+                 },
+                 notification: {
+                   poll: pollAsyncJobResult
+                 }
+               }
+             },
              fields: [
                {
+                 id: { label: 'ID' },
                  name: { label: 'label.name', header: true },
                  networkname: {label: 'Network Name' },
 +                ipaddress: { label: 'label.ip.address' },
                  type: { label: 'label.type' },
 -                ipaddress: { label: 'label.ip.address' },                
                  gateway: { label: 'label.gateway' },
                  netmask: { label: 'label.netmask' },
 -
 -                ip6address: { label: 'IPv6 IP Address' },
 -                ip6gateway: { label: 'IPv6 Gateway' },
 -                ip6cidr: { label: 'IPv6 CIDR' },
 -
                  isdefault: {
                    label: 'label.is.default',
                    converter: function(data) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf67e584/ui/scripts/network.js
----------------------------------------------------------------------

Reply via email to