File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
api/src/main/java/org/apache/cloudstack/api/response
server/src/main/java/com/cloud/api Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,10 @@ public void setIsolationMethods(List<String> isolationMethods) {
139139 this .isolationMethods = buf .delete (buf .length () - 1 , buf .length ()).toString ();
140140 }
141141
142+ public String getIsolationMethods () {
143+ return isolationMethods ;
144+ }
145+
142146 public void setName (String name ) {
143147 this .name = name ;
144148 }
Original file line number Diff line number Diff line change 2525import com .cloud .network .PhysicalNetworkTrafficType ;
2626import com .cloud .serializer .Param ;
2727
28- import java .util .List ;
29-
3028@ EntityReference (value = PhysicalNetworkTrafficType .class )
3129public class TrafficTypeResponse extends BaseResponse {
3230
@@ -64,7 +62,7 @@ public class TrafficTypeResponse extends BaseResponse {
6462
6563 @ SerializedName (ApiConstants .ISOLATION_METHODS )
6664 @ Param (description = "isolation methods for the physical network traffic" )
67- private List < String > isolationMethods ;
65+ private String isolationMethods ;
6866
6967 @ SerializedName (ApiConstants .OVM3_NETWORK_LABEL )
7068 @ Param (description = "The network name of the physical device dedicated to this traffic on an OVM3 host" )
@@ -139,13 +137,14 @@ public void setOvm3Label(String ovm3Label) {
139137 this .ovm3NetworkLabel = ovm3Label ;
140138 }
141139
142- public List < String > getIsolationMethods () {
140+ public String getIsolationMethods () {
143141 return isolationMethods ;
144142 }
145143
146- public void setIsolationMethods (List < String > isolationMethods ) {
144+ public void setIsolationMethods (String isolationMethods ) {
147145 this .isolationMethods = isolationMethods ;
148146 }
147+
149148 public String getVlan () {
150149 return vlan ;
151150 }
Original file line number Diff line number Diff line change @@ -3082,7 +3082,10 @@ public TrafficTypeResponse createTrafficTypeResponse(PhysicalNetworkTrafficType
30823082 PhysicalNetwork pnet = ApiDBUtils .findPhysicalNetworkById (result .getPhysicalNetworkId ());
30833083 if (pnet != null ) {
30843084 response .setPhysicalNetworkId (pnet .getUuid ());
3085- response .setIsolationMethods (pnet .getIsolationMethods ());
3085+ // using PhysicalNetworkResponse only to convert isolation methods to string
3086+ PhysicalNetworkResponse pnetResponse = new PhysicalNetworkResponse ();
3087+ pnetResponse .setIsolationMethods (pnet .getIsolationMethods ());
3088+ response .setIsolationMethods (pnetResponse .getIsolationMethods ());
30863089 }
30873090 if (result .getTrafficType () != null ) {
30883091 response .setTrafficType (result .getTrafficType ().toString ());
You can’t perform that action at this time.
0 commit comments