{"action":"closed","issue":{"url":"https://api.github.com/repos/equelin/Unity-Powershell/issues/53","repository_url":"https://api.github.com/repos/equelin/Unity-Powershell","labels_url":"https://api.github.com/repos/equelin/Unity-Powershell/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/equelin/Unity-Powershell/issues/53/comments","events_url":"https://api.github.com/repos/equelin/Unity-Powershell/issues/53/events","html_url":"https://github.com/equelin/Unity-Powershell/issues/53","id":307095852,"number":53,"title":"Set-UnityNFSShare - Request body is not correct error","user":{"login":"atscomposer","id":20479312,"avatar_url":"https://avatars3.githubusercontent.com/u/20479312?v=4","gravatar_id":"","url":"https://api.github.com/users/atscomposer","html_url":"https://github.com/atscomposer","followers_url":"https://api.github.com/users/atscomposer/followers","following_url":"https://api.github.com/users/atscomposer/following{/other_user}","gists_url":"https://api.github.com/users/atscomposer/gists{/gist_id}","starred_url":"https://api.github.com/users/atscomposer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atscomposer/subscriptions","organizations_url":"https://api.github.com/users/atscomposer/orgs","repos_url":"https://api.github.com/users/atscomposer/repos","events_url":"https://api.github.com/users/atscomposer/events{/privacy}","received_events_url":"https://api.github.com/users/atscomposer/received_events","type":"User","site_admin":false},"labels":[{"id":383555019,"url":"https://api.github.com/repos/equelin/Unity-Powershell/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":{"login":"equelin","id":9823778,"avatar_url":"https://avatars0.githubusercontent.com/u/9823778?v=4","gravatar_id":"","url":"https://api.github.com/users/equelin","html_url":"https://github.com/equelin","followers_url":"https://api.github.com/users/equelin/followers","following_url":"https://api.github.com/users/equelin/following{/other_user}","gists_url":"https://api.github.com/users/equelin/gists{/gist_id}","starred_url":"https://api.github.com/users/equelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equelin/subscriptions","organizations_url":"https://api.github.com/users/equelin/orgs","repos_url":"https://api.github.com/users/equelin/repos","events_url":"https://api.github.com/users/equelin/events{/privacy}","received_events_url":"https://api.github.com/users/equelin/received_events","type":"User","site_admin":false},"assignees":[{"login":"equelin","id":9823778,"avatar_url":"https://avatars0.githubusercontent.com/u/9823778?v=4","gravatar_id":"","url":"https://api.github.com/users/equelin","html_url":"https://github.com/equelin","followers_url":"https://api.github.com/users/equelin/followers","following_url":"https://api.github.com/users/equelin/following{/other_user}","gists_url":"https://api.github.com/users/equelin/gists{/gist_id}","starred_url":"https://api.github.com/users/equelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equelin/subscriptions","organizations_url":"https://api.github.com/users/equelin/orgs","repos_url":"https://api.github.com/users/equelin/repos","events_url":"https://api.github.com/users/equelin/events{/privacy}","received_events_url":"https://api.github.com/users/equelin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-03-21T01:40:26Z","updated_at":"2018-04-16T09:03:39Z","closed_at":"2018-04-16T09:03:38Z","author_association":"NONE","body":"Seeing the following error with the set-unitynfsshare cmdlet:\r\n\r\nThe array sends an error message:\r\n\r\nError code: 422\r\nError description: Unprocessable Entity\r\nError details: {\"error\":{\"errorCode\":131149877,\"httpStatusCode\":422,\"messages\":[{\"en-US\":\"Request body is not correct. There may be duplicate parameters, wrong parameter name\r\n. Please refer to API documentation page and ensure the body is correct. (Error Code:0x7d13035)\"}],\"created\":\"2018-03-21T01:33:35.133Z\"}}\r\n\r\nInvoke-WebRequest : The remote server returned an error: (422) Unprocessable Entity.\r\nAt line:33 char:15\r\n+ ...     $data = Invoke-WebRequest -Uri $URI -ContentType \"application/jso ...\r\n+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException\r\n    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand\r\n\r\nHere is the verbose output as well as the command run:\r\nPS C:\\Windows\\system32>                 Set-UnityNFSShare -Id $checkNewShare.id -rootAccessHosts $AccessHosts -append -confirm:$false -verbose\r\n\r\nVERBOSE: GET https://10.72.5.150/api/types/system/instances with 0-byte payload\r\nVERBOSE: received -1-byte response of content type application/json; version=1.0;charset=UTF-8\r\nVERBOSE: [Get-UnityObject] Object Type is String\r\nVERBOSE: GET https://10.72.5.150/api/types/system/instances with 0-byte payload\r\nVERBOSE: received -1-byte response of content type application/json; version=1.0;charset=UTF-8\r\nVERBOSE: GET https://10.72.5.150/api/types/nfsShare/instances?fields=filesystem,snap,description,type,readOnlyHosts,isReadOnly,nfsOwnerUsername,creationTime,readWriteHosts,ex\r\nportPaths,name,noAccessHosts,id,modificationTime,path,rootAccessHosts,role,minSecurity,defaultAccess&compact=true with 0-byte payload\r\nVERBOSE: received -1-byte response of content type application/json; version=1.0;charset=UTF-8\r\nVERBOSE: [Get-UnityObject] Object ID: NFSShare_106,Object Name: SRMDR-Colo_OVM\r\nVERBOSE: GET https://10.72.5.150/api/types/system/instances with 0-byte payload\r\nVERBOSE: received -1-byte response of content type application/json; version=1.0;charset=UTF-8\r\nVERBOSE: GET https://10.72.5.150/api/types/storageResource/instances?fields=sizeAllocated,luns,familyBaseStorageResource,compressionSizeSaved,hostVVolDatastore,type,snapSched\r\nule,blockHostAccess,metadataSizeAllocated,snapsSizeTotal,metadataSize,filesystem,esxFilesystemMajorVersion,isSnapSchedulePaused,vmwareUUID,parentSnap,snapsSizeAllocated,famil\r\nySnapCount,name,virtualVolumes,moves,datastores,esxFilesystemBlockSize,isReplicationDestination,replicationType,esxMountProtocol,thinStatus,pools,id,familyCloneCount,nonBaseS\r\nizeAllocated,health,nonBaseSize,familySizeAllocatedTotal,sizeTotal,description,compressionPercent,compressionStatus,snapCount,sizeUsed,isThinClone,originalParentStorageResour\r\nce,compressionRatio,perTierSizeUsed&compact=true with 0-byte payload\r\nVERBOSE: received -1-byte response of content type application/json; version=1.0;charset=UTF-8\r\nVERBOSE: {\r\n    \"nfsShareModify\":  {\r\n                           \"nfsShareParameters\":  {\r\n                                                      \"rootAccessHosts\":  [\r\n                                                                              {\r\n                                                                                  \"id\":  \"Host_7\"\r\n                                                                              },\r\n                                                                              {\r\n                                                                                  \"id\":  \"Host_13\"\r\n                                                                              },\r\n                                                                              {\r\n                                                                                  \"id\":  \"Host_15\"\r\n                                                                              },\r\n                                                                              {\r\n                                                                                  \"id\":  \"Host_45\"\r\n                                                                              }\r\n                                                                          ],\r\n                                                      \"isReadOnly\":  false\r\n                                                  },\r\n                           \"nfsShare\":  {\r\n                                            \"id\":  \"NFSShare_106\"\r\n                                        }\r\n                       }\r\n}\r\nVERBOSE: URL: https://10.72.5.150/api/instances/storageResource/res_18/action/modifyFilesystem\r\nVERBOSE: Performing the operation \"Modify NFS Share SRMDR-Colo_OVM\" on target \"Colo-Unity-01\".\r\nVERBOSE: POST https://10.72.5.150/api/instances/storageResource/res_18/action/modifyFilesystem with -1-byte payload\r\n\r\n$PSVersionTable output:\r\n\r\nName                           Value                                                                                                                                         \r\n----                           -----                                                                                                                                         \r\nPSVersion                      5.1.14393.1770                                                                                                                                \r\nPSEdition                      Desktop                                                                                                                                       \r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                       \r\nBuildVersion                   10.0.14393.1770                                                                                                                               \r\nCLRVersion                     4.0.30319.42000                                                                                                                               \r\nWSManStackVersion              3.0                                                                                                                                           \r\nPSRemotingProtocolVersion      2.3                                                                                                                                           \r\nSerializationVersion           1.1.0.1  \r\n\r\nPlease makes sure these boxes are checked before submitting your issue (put an X between the brackets).\r\n\r\n- [X] Check that your Powershell version > 5.0 (Bonus point if you are using the latest version available)\r\n- [X] Check that you follow the instructions for installing the module\r\n"}}
{"actor":{"display_login":"equelin"}}