Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: LMGR-663: zhmcclient json.marshal error for domainIdx is 0 #14

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

bjzhangl
Copy link
Contributor

No description provided.

@bjzhangl
Copy link
Contributor Author

For the following struct:
addDomainsConfig: [
{0 control-usage}

]
json marshal result is [
{"access-mode":"control-usage"}

]
we expect is [
{"domain-index":0,"access-mode":"control-usage"}

]

@bjzhangl
Copy link
Contributor Author

zhangli@bogon golang-zhmcclient % bash go-test.sh -p pkg/zhmcclient
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:39: NewAdapterManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:58: ListAdapters 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:104: GetAdapterProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:148: GetStorageAdapterPortProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:192: GetNetworkAdapterPortProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:236: CreateHipersocket 83.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/adapter.go:281: DeleteHipersocket 76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:38: NewZapLogger 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:117: newClientStruct 27.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:152: NewClient 30.8%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:179: GetEndpointURLFromString 85.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:193: IsExpectedHttpStatus 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:202: NeedLogon 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:218: CloneEndpointURL 60.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:227: TraceOn 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:235: TraceOff 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:241: SetSkipCertVerify 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:245: clearSession 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:249: Logon 21.1%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:283: ChangePassword 14.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:323: LogonConsole 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:343: LogoffConsole 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:357: Logoff 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:372: IsLogon 42.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:395: setUserAgent 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:399: setRequestHeaders 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:410: SetCertificate 50.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:430: UploadRequest 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:453: ExecuteRequest 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:485: executeMethod 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:529: executeUpload 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:565: traceHTTP 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:611: createMetricsContext 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:631: GetMetricsContext 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/cpc.go:39: NewCpcManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/cpc.go:51: ListCPCs 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/cpc.go:95: GetCPCProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/job.go:39: NewJobManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/job.go:50: QueryJob 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/job.go:88: DeleteJob 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/job.go:121: CancelJob 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:64: NewLparManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:81: ListLPARs 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:125: GetLparProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:169: CreateLPAR 75.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:216: UpdateLparProperties 76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:251: StartLPAR 75.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:300: StopLPAR 85.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:351: DeleteLPAR 76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:385: MountIsoImage 80.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:431: UnmountIsoImage 76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:463: ListNics 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:484: AttachStorageGroupToPartition 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:521: DetachStorageGroupToPartition 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:557: FetchAsciiConsoleURI 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:632: GetEnergyDetailsforLPAR 82.4%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:663: AttachCryptoToPartition 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/metrics.go:34: NewMetricsManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/metrics.go:43: CollectMetrics 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/metrics.go:51: GetLiveEnergyDetailsforLPAR 64.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/nic.go:41: NewNicManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/nic.go:53: CreateNic 83.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/nic.go:96: DeleteNic 76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/nic.go:130: GetNicProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/nic.go:172: UpdateNicProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:45: NewStorageGroupManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:58: ListStorageGroups 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:106: GetStorageGroupProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:149: ListStorageVolumes 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:192: GetStorageVolumeProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:234: UpdateStorageGroupProperties 88.2%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:276: FulfillStorageGroup 88.2%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:319: CreateStorageGroups 90.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:360: GetStorageGroupPartitions 84.6%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/sgroup.go:386: DeleteStorageGroup 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:87: Error 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:91: getHmcErrorFromErr 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:98: getHmcErrorFromMsg 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:105: BuildUrlFromQuery 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:116: RetrieveBytes 91.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:136: GenerateErrorFromResponse 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:151: newMetricsContext 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:167: extractMetricObjects 87.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:240: metricValueConvert 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/vswitch.go:39: NewVirtualSwitchManager 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/vswitch.go:52: ListVirtualSwitches 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/vswitch.go:98: GetVirtualSwitchProperties 100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:43: NewManagerFromOptions 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:51: NewManagerFromClient 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:66: ListCPCs 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:69: GetCPCProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:74: ListLPARs 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:77: GetLparProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:80: UpdateLparProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:83: CreateLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:86: StartLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:89: StopLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:92: DeleteLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:95: MountIsoImage 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:98: UnmountIsoImage 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:101: ListNics 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:105: AttachStorageGroupToPartition 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:109: DetachStorageGroupToPartition 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:113: FetchAsciiConsoleURI 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:117: GetEnergyDetailsforLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:121: AttachCryptoToPartition 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:125: GetLiveEnergyDetailsforLPAR 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:130: ListAdapters 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:133: GetAdapterProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:136: GetNetworkAdapterPortProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:139: GetStorageAdapterPortProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:142: CreateHipersocket 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:145: DeleteHipersocket 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:151: ListStorageGroups 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:155: GetStorageGroupProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:159: ListStorageVolumes 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:163: GetStorageVolumeProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:167: UpdateStorageGroupProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:171: FulfillStorageGroup 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:175: CreateStorageGroups 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:179: GetStorageGroupPartitions 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:183: DeleteStorageGroup 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:189: ListVirtualSwitches 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:193: GetVirtualSwitchProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:198: CreateNic 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:201: DeleteNic 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:204: GetNicProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:207: UpdateNicProperties 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:212: QueryJob 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:215: DeleteJob 0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:218: CancelJob 0.0%
total: (statements) 65.2%

@bjzhangl
Copy link
Contributor Author

@huoqifeng @jiangphcn please help review~

Copy link
Contributor

@jiangphcn jiangphcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@jiangphcn jiangphcn merged commit 4d04b40 into zhmcclient:master Nov 23, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants