@@ -44,17 +44,17 @@ private static CloudPool createPoolIfNotExists(BatchClient client, String poolId
44
44
// See detail of creating IaaS pool at
45
45
// https://blogs.technet.microsoft.com/windowshpc/2016/03/29/introducing-linux-support-on-azure-batch/
46
46
// Get the sku image reference
47
- List <NodeAgentSku > skus = client .accountOperations ().listNodeAgentSkus ();
47
+ List <ImageInformation > skus = client .accountOperations ().listSupportedImages ();
48
48
String skuId = null ;
49
49
ImageReference imageRef = null ;
50
50
51
- for (NodeAgentSku sku : skus ) {
51
+ for (ImageInformation sku : skus ) {
52
52
if (sku .osType () == OSType .LINUX ) {
53
- for ( ImageReference imgRef : sku .verifiedImageReferences () ) {
54
- if (imgRef .publisher ().equalsIgnoreCase (osPublisher )
55
- && imgRef .offer ().equalsIgnoreCase (osOffer )) {
56
- imageRef = imgRef ;
57
- skuId = sku .id ();
53
+ if ( sku .verificationType () == VerificationType . VERIFIED ) {
54
+ if (sku . imageReference () .publisher ().equalsIgnoreCase (osPublisher )
55
+ && sku . imageReference () .offer ().equalsIgnoreCase (osOffer )) {
56
+ imageRef = sku . imageReference () ;
57
+ skuId = sku .nodeAgentSKUId ();
58
58
break ;
59
59
}
60
60
}
@@ -208,7 +208,7 @@ private static void submitJobAndAddTask(BatchClient client, CloudBlobContainer c
208
208
String jobId )
209
209
throws BatchErrorException , IOException , StorageException , InvalidKeyException , URISyntaxException {
210
210
String BLOB_FILE_NAME = "test.txt" ;
211
- String LOCAL_FILE_PATH = "./" + BLOB_FILE_NAME ;
211
+ String LOCAL_FILE_PATH = "./PoolAndResourceFile/ " + BLOB_FILE_NAME ;
212
212
213
213
// Create job run at the specified pool
214
214
PoolInformation poolInfo = new PoolInformation ();
0 commit comments