Skip to content

Commit

Permalink
Fix SDK dependency issue (#4161)
Browse files Browse the repository at this point in the history
* Upgrade java SDK to 1.30.0

* Add preview to explorer node label
  • Loading branch information
Flanker32 authored Mar 20, 2020
1 parent add2045 commit b4d8d8b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ depLocation=dependencies/
excp=Exception in getClasspathEntries
azureSDKcontainerID=com.microsoft.azuretools.SDK_CONTAINER
sdkID=com.microsoft.azuretools.sdk
sdkJar=dependencies/azure-1.26.0.jar
sdkJar=dependencies/azure-1.30.0.jar
jstDep=org.eclipse.jst.component.dependency
aiCheckBoxTxt=Enable telemetry with Application Insights
webxmlPath=WebContent/WEB-INF/web.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lblVersion=Version :
libNotAvail=Library is not available.
notFound=Not found
sdkID=com.microsoft.azuretools.sdk
sdkJar=dependencies/azure-1.26.0.jar
sdkJar=dependencies/azure-1.30.0.jar
title=Microsoft Azure Libraries for Java
verNotAvail=The selected version is not available.
version1=Microsoft Azure Libraries for Java, version %s.%s.%s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ err=Error
prefFileName=WAEclipsePlugin
bundleName=org.eclipse.core.runtime
sdkLibBundleName=com.microsoftopentechnologies.windowsazure.tools.sdk
sdkLibBaseJar=dependencies/azure-1.26.0.jar
sdkLibBaseJar=dependencies/azure-1.30.0.jar
SDKLocErrMsg=Error occurred while retrieving path of Azure libraries
resCLExWkspRfrsh=Exception while refresh of workspace.
cmhLblStrgAcc=Storage Accounts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class PluginHelper {

private static final String AZURE_ARTIFACT = "azure-1.26.0.jar";
private static final String AZURE_ARTIFACT = "azure-1.30.0.jar";

/**
* @return resource filename in plugin's directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
import com.microsoft.azure.management.resources.Location;
import com.microsoft.azure.management.resources.ResourceGroup;
import com.microsoft.azure.management.resources.Subscription;
import com.microsoft.azure.management.storage.SkuName;
import com.microsoft.azure.management.storage.StorageAccount;
import com.microsoft.azure.management.storage.StorageAccountSkuType;
import com.microsoft.azuretools.authmanage.SubscriptionManager;
import com.microsoft.azuretools.authmanage.models.SubscriptionDetail;
import com.microsoft.azuretools.sdkmanage.AzureManager;
Expand Down Expand Up @@ -233,7 +235,7 @@ public static List<String> getAvailableStorageAccounts(Azure azureClient, String
if (azureClient != null) {
for (StorageAccount storageAccount : azureClient.storageAccounts().list()) {
if (vmImageSizeType != null) {
if (storageAccount.sku().name().name().toLowerCase().equals(vmImageSizeType.toLowerCase())) {
if (storageAccount.skuType().name() != null && storageAccount.skuType().name().equals(SkuName.fromString(vmImageSizeType.toLowerCase()))) {
result.add(storageAccount.name());
}
} else {
Expand All @@ -255,7 +257,7 @@ public static List<AzureDockerStorageAccount> getStorageAccounts(Azure azureClie
dockerStorageAccount.region = storageAccount.regionName();
dockerStorageAccount.resourceGroup = storageAccount.resourceGroupName();
dockerStorageAccount.sid = azureClient.subscriptionId();
dockerStorageAccount.skuType = storageAccount.sku().name().name();
dockerStorageAccount.skuType = storageAccount.skuType().name().toString();
result.add(dockerStorageAccount);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,16 @@ public static StorageAccount createStorageAccount(String subscriptionId, String
} else {
newStorageAccountWithGroup = newStorageAccountBlank.withExistingResourceGroup(resourceGroup);
}
switch (kind) {
case STORAGE:
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKind();
break;
case STORAGE_V2:
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKindV2();
break;
case BLOB_STORAGE:
newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobStorageAccountKind().withAccessTier(accessTier);
break;
default:
throw new Exception("Unknown Storage Account Kind:" + kind.toString());

if (Kind.STORAGE.equals(kind)) {
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKind();
} else if (Kind.STORAGE_V2.equals(kind)) {
newStorageAccountWithGroup = newStorageAccountWithGroup.withGeneralPurposeAccountKindV2();
} else if (Kind.BLOB_STORAGE.equals(kind)) {
newStorageAccountWithGroup = newStorageAccountWithGroup.withBlobStorageAccountKind().withAccessTier(accessTier);
} else {
throw new Exception("Unknown Storage Account Kind:" + kind.toString());

}

if (enableEncription) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class FunctionModule extends AzureRefreshableNode implements FunctionModuleView {
private static final String FUNCTION_SERVICE_MODULE_ID = FunctionModule.class.getName();
private static final String ICON_PATH = "azure-functions-small.png";
private static final String BASE_MODULE_NAME = "Function App";
private static final String BASE_MODULE_NAME = "Function App(Preview)";
private static final String FUNCTION_MODULE = "FunctionModule";
private static final String FAILED_TO_DELETE_FUNCTION_APP = "Failed to delete Function App %s";
private static final String ERROR_DELETING_FUNCTION_APP = "Azure Services Explorer - Error Deleting Function App";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.microsoft.azure.management.appservice.FunctionApp;
import com.microsoft.azure.management.appservice.FunctionDeploymentSlots;
import com.microsoft.azure.management.appservice.NameValuePair;
import com.microsoft.azure.management.appservice.SupportedTlsVersions;
import com.microsoft.azure.management.appservice.WebAppBase;
import com.microsoft.azure.management.appservice.implementation.SiteInner;
import com.microsoft.azure.management.storage.StorageAccount;
Expand Down Expand Up @@ -117,6 +118,11 @@ public FunctionApp.Update update() {
return getFunctionApp().update();
}

@Override
public SupportedTlsVersions minTlsVersion() {
return getFunctionApp().minTlsVersion();
}

@Override
protected WebAppBase getWebAppBase() {
return getFunctionApp();
Expand Down
4 changes: 2 additions & 2 deletions Utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure</artifactId>
<version>1.26.0</version>
<version>1.30.0</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
Expand Down Expand Up @@ -362,7 +362,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-storage</artifactId>
<version>1.26.0</version>
<version>1.30.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down

0 comments on commit b4d8d8b

Please sign in to comment.