Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/HPCCache/HPCCache/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fixed bug for `New-AzHpcCacheStorageTarget` and help text.

## Version 0.1.0
* Preview of `Az.HPCCache` module
15 changes: 13 additions & 2 deletions src/HPCCache/HPCCache/Commands/NewAzHpcStorageTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,18 @@ public override void ExecuteCmdlet()
this.Name,
() =>
{
this.storageTarget = this.CLFS.IsPresent ? this.CreateClfsStorageTargetParameters() : this.CreateNfsStorageTargetParameters();
if (this.CLFS.IsPresent)
{
this.storageTarget = this.CreateClfsStorageTargetParameters();
}
else if (this.NFS.IsPresent)
{
this.storageTarget = this.CreateNfsStorageTargetParameters();
}
else
{
throw new Exception(string.Format(Resources.CLFSorNFS));
}
if (this.IsParameterBound(c => c.Junction))
{
this.storageTarget.Junctions = new List<NamespaceJunction>();
Expand Down Expand Up @@ -170,7 +181,7 @@ private bool DoesStorageTargetExists()
this.CacheName,
this.Name);

throw new Exception(string.Format(Resources.UpgradeHpcCache, this.Name, this.CacheName));
throw new Exception(string.Format(Resources.StorageTargetAlreadyExist, this.Name, this.CacheName));
}
catch (CloudErrorException e)
{
Expand Down
9 changes: 9 additions & 0 deletions src/HPCCache/HPCCache/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/HPCCache/HPCCache/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CLFSorNFS" xml:space="preserve">
<value>Need CLFS or NFS flag.</value>
</data>
<data name="ConfirmCreateStorageTarget" xml:space="preserve">
<value>Are you sure you want to create HPC cache storage target '{0}'?</value>
</data>
Expand Down
4 changes: 2 additions & 2 deletions src/HPCCache/HPCCache/help/New-AzHpcCacheStorageTarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The **New-AzHpcCacheStorageTarget** cmdlet adds a Storage Target to Azure HPC Ca

### Example 1
```powershell
PS C:\> New-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -CLFS -StorageContainerID "/subscriptions/testsub/resourceGroups/testRG/providers/Microsoft.Storage/storageAccounts/testdstorageaccount/blobServices/default/containers/testcontainer" -Junctions @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
PS C:\> New-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -CLFS -StorageContainerID "/subscriptions/testsub/resourceGroups/testRG/providers/Microsoft.Storage/storageAccounts/testdstorageaccount/blobServices/default/containers/testcontainer" -Junction @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
```

### Example 2
```powershell
PS C:\> New-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -NFS -UsageModel "READ_HEAVY_INFREQ" -Junctions @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
PS C:\> New-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -NFS -UsageModel "READ_HEAVY_INFREQ" -Junction @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
```

## PARAMETERS
Expand Down
4 changes: 2 additions & 2 deletions src/HPCCache/HPCCache/help/Set-AzHpcCacheStorageTarget.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ The **Set-AzHpcCacheStorageTarget** cmdlet updates a Storage Target attached to

### Example 1
```powershell
PS C:\> Set-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -CLFS -Junctions @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
PS C:\> Set-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -CLFS -Junction @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/"})
```

### Example 2
```powershell
PS C:\> Set-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -NFS -Junctions @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/export"})
PS C:\> Set-AzHpcCacheStorageTarget -ResourceGroupName testRG -CacheName testCache -StorageTargetName testST -NFS -Junction @(@{"namespacePath"="/msazure";"targetPath"="/";"nfsExport"="/export"})
```

## PARAMETERS
Expand Down