mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CS-9919: Support for Nexus Swiches (Cisco Vswitches)
Description: Do not set the access mode of an interface if vlanid is zero.
This commit is contained in:
		
							parent
							
								
									b6687faf89
								
							
						
					
					
						commit
						8db1ca296b
					
				| @ -50,8 +50,7 @@ public class VsmCommand { | |||||||
| 
 | 
 | ||||||
|     public enum OperationType { |     public enum OperationType { | ||||||
|         addvlanid, |         addvlanid, | ||||||
|         removevlanid, |         removevlanid | ||||||
|         setrate |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public static String getAddPortProfile(String name, PortProfileType type, |     public static String getAddPortProfile(String name, PortProfileType type, | ||||||
| @ -338,7 +337,9 @@ public class VsmCommand { | |||||||
|             // Switchport mode. |             // Switchport mode. | ||||||
|             portProf.appendChild(getSwitchPortMode(doc, mode)); |             portProf.appendChild(getSwitchPortMode(doc, mode)); | ||||||
|             // Adding vlan details. |             // Adding vlan details. | ||||||
|             portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid))); |             if (vlanid > 0) { | ||||||
|  |                 portProf.appendChild(getAddVlanDetails(doc, mode, Integer.toString(vlanid))); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // Command "vmware port-group". |         // Command "vmware port-group". | ||||||
|  | |||||||
| @ -165,7 +165,6 @@ public class HypervisorHostHelper { | |||||||
| 		 | 		 | ||||||
| 		List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>(); | 		List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>(); | ||||||
| 		params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString())); | 		params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString())); | ||||||
| 		params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString())); |  | ||||||
| 		 | 		 | ||||||
| 		try { | 		try { | ||||||
| 			netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);  | 			netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);  | ||||||
| @ -202,7 +201,6 @@ public class HypervisorHostHelper { | |||||||
| 		 | 		 | ||||||
| 		List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>(); | 		List<Pair<OperationType, String>> params = new ArrayList<Pair<OperationType, String>>(); | ||||||
| 		params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString())); | 		params.add(new Pair<OperationType, String>(OperationType.addvlanid, vid.toString())); | ||||||
| 		params.add(new Pair<OperationType, String>(OperationType.setrate, networkRateMbps.toString())); |  | ||||||
| 		 | 		 | ||||||
| 		try { | 		try { | ||||||
| 			netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);  | 			netconfClient.updatePortProfile(ethPortProfileName, SwitchPortMode.access, params);  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user