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
@@ -67,7 +65,7 @@ public class TrafficTypeResponse extends BaseResponse {
6765
6866 @ SerializedName (ApiConstants .ISOLATION_METHODS )
6967 @ Param (description = "isolation methods for the physical network traffic" )
70- private List < String > isolationMethods ;
68+ private String isolationMethods ;
7169
7270 @ SerializedName (ApiConstants .OVM3_NETWORK_LABEL )
7371 @ Param (description = "The network name of the physical device dedicated to this traffic on an OVM3 host" )
@@ -142,13 +140,14 @@ public void setOvm3Label(String ovm3Label) {
142140 this .ovm3NetworkLabel = ovm3Label ;
143141 }
144142
145- public List < String > getIsolationMethods () {
143+ public String getIsolationMethods () {
146144 return isolationMethods ;
147145 }
148146
149- public void setIsolationMethods (List < String > isolationMethods ) {
147+ public void setIsolationMethods (String isolationMethods ) {
150148 this .isolationMethods = isolationMethods ;
151149 }
150+
152151 public String getVlan () {
153152 return vlan ;
154153 }
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