From 41fc03d4e7d5471f79ce62df0ba6dd62d3b7968a Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 8 Feb 2013 16:19:32 +0530 Subject: [PATCH] bigswitch-vns: Fix since version in apis, add spring annotation to fix NPE Signed-off-by: Rohit Yadav --- .../src/com/cloud/api/commands/AddBigSwitchVnsDeviceCmd.java | 2 +- .../src/com/cloud/api/commands/DeleteBigSwitchVnsDeviceCmd.java | 2 +- .../src/com/cloud/api/commands/ListBigSwitchVnsDevicesCmd.java | 2 +- .../src/com/cloud/network/element/BigSwitchVnsElement.java | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/AddBigSwitchVnsDeviceCmd.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/AddBigSwitchVnsDeviceCmd.java index c4c4ba9aa80..30f631dd5d6 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/AddBigSwitchVnsDeviceCmd.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/AddBigSwitchVnsDeviceCmd.java @@ -37,7 +37,7 @@ import com.cloud.network.element.BigSwitchVnsElementService; import com.cloud.user.UserContext; import com.cloud.utils.exception.CloudRuntimeException; -@APICommand(name = "addBigSwitchVnsDevice", responseObject=BigSwitchVnsDeviceResponse.class, description="Adds a BigSwitch VNS device") +@APICommand(name = "addBigSwitchVnsDevice", responseObject=BigSwitchVnsDeviceResponse.class, description="Adds a BigSwitch VNS device", since = "4.1.0") public class AddBigSwitchVnsDeviceCmd extends BaseAsyncCmd { private static final String s_name = "addbigswitchvnsdeviceresponse"; @Inject BigSwitchVnsElementService _bigswitchVnsElementService; diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/DeleteBigSwitchVnsDeviceCmd.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/DeleteBigSwitchVnsDeviceCmd.java index 06eee15f614..f26bddedcb0 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/DeleteBigSwitchVnsDeviceCmd.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/DeleteBigSwitchVnsDeviceCmd.java @@ -35,7 +35,7 @@ import com.cloud.network.element.BigSwitchVnsElementService; import com.cloud.user.UserContext; import com.cloud.utils.exception.CloudRuntimeException; -@APICommand(name = "deleteBigSwitchVnsDevice", responseObject=SuccessResponse.class, description=" delete a bigswitch vns device") +@APICommand(name = "deleteBigSwitchVnsDevice", responseObject=SuccessResponse.class, description=" delete a bigswitch vns device", since = "4.1.0") public class DeleteBigSwitchVnsDeviceCmd extends BaseAsyncCmd { private static final String s_name = "deletebigswitchvnsdeviceresponse"; @Inject BigSwitchVnsElementService _bigswitchVnsElementService; diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/ListBigSwitchVnsDevicesCmd.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/ListBigSwitchVnsDevicesCmd.java index c0710ea7537..002d750604d 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/ListBigSwitchVnsDevicesCmd.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/api/commands/ListBigSwitchVnsDevicesCmd.java @@ -41,7 +41,7 @@ import com.cloud.network.BigSwitchVnsDeviceVO; import com.cloud.network.element.BigSwitchVnsElementService; import com.cloud.utils.exception.CloudRuntimeException; -@APICommand(name = "listBigSwitchVnsDevices", responseObject=BigSwitchVnsDeviceResponse.class, description="Lists BigSwitch Vns devices") +@APICommand(name = "listBigSwitchVnsDevices", responseObject=BigSwitchVnsDeviceResponse.class, description="Lists BigSwitch Vns devices", since = "4.1.0") public class ListBigSwitchVnsDevicesCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListBigSwitchVnsDevicesCmd.class.getName()); private static final String s_name = "listbigswitchvnsdeviceresponse"; diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java index 67d0d8df86a..95c9e18304a 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java @@ -88,7 +88,9 @@ import com.cloud.vm.NicProfile; import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; +import org.springframework.stereotype.Component; +@Component @Local(value = {NetworkElement.class, ConnectivityProvider.class}) public class BigSwitchVnsElement extends AdapterBase implements BigSwitchVnsElementService, ConnectivityProvider, ResourceStateAdapter {