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

pr: add password rotation method of session logon API #8

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

renylin
Copy link

@renylin renylin commented Oct 17, 2023

Signed-off-by: Yanlin Ren renylin@cn.ibm.com

Signed-off-by: Yanlin Ren <renylin@cn.ibm.com>
@renylin
Copy link
Author

renylin commented Oct 17, 2023

Unit test results:

 renyanlin@Rens-MBP  ~/zvpcmgr/githubpub/golang-zhmcclient   dev/renylin/rotate_pwd  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:113:	newClientStruct			27.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:148:	NewClient			30.8%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:175:	GetEndpointURLFromString	85.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:189:	IsExpectedHttpStatus		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:198:	NeedLogon			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:214:	CloneEndpointURL		60.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:223:	TraceOn				100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:231:	TraceOff			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:237:	SetSkipCertVerify		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:241:	clearSession			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:245:	Logon				25.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:273:	ChangePassword			14.3%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:313:	LogonConsole			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:333:	LogoffConsole			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:347:	Logoff				0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:362:	IsLogon				42.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:385:	setUserAgent			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:389:	setRequestHeaders		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:400:	SetCertificate			50.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:420:	UploadRequest			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:443:	ExecuteRequest			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:475:	executeMethod			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:519:	executeUpload			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/client.go:555:	traceHTTP			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:51:	NewLparManager			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:68:	ListLPARs			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:112:	GetLparProperties		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:156:	CreateLPAR			75.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:203:	UpdateLparProperties		76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:238:	StartLPAR			75.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:287:	StopLPAR			85.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:338:	DeleteLPAR			76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:372:	MountIsoImage			80.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:418:	UnmountIsoImage			76.9%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:450:	ListNics			100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:471:	AttachStorageGroupToPartition	100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:508:	DetachStorageGroupToPartition	100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/lpar.go:544:	FetchAsciiConsoleURI		0.0%
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:50:	Error				100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:54:	getHmcErrorFromErr		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:61:	getHmcErrorFromMsg		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:68:	BuildUrlFromQuery		100.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:79:	RetrieveBytes			91.7%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/utils.go:99:	GenerateErrorFromResponse	100.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:41:	NewManagerFromOptions		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:49:	NewManagerFromClient		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:63:	ListCPCs			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:66:	GetCPCProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:71:	ListLPARs			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:74:	GetLparProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:77:	UpdateLparProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:80:	CreateLPAR			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:83:	StartLPAR			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:86:	StopLPAR			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:89:	DeleteLPAR			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:92:	MountIsoImage			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:95:	UnmountIsoImage			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:98:	ListNics			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:102:	AttachStorageGroupToPartition	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:106:	DetachStorageGroupToPartition	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:110:	FetchAsciiConsoleURI		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:115:	ListAdapters			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:118:	GetAdapterProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:121:	GetNetworkAdapterPortProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:124:	GetStorageAdapterPortProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:127:	CreateHipersocket		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:130:	DeleteHipersocket		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:136:	ListStorageGroups		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:140:	GetStorageGroupProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:144:	ListStorageVolumes		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:148:	GetStorageVolumeProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:152:	UpdateStorageGroupProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:156:	FulfillStorageGroup		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:160:	CreateStorageGroups		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:164:	GetStorageGroupPartitions	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:168:	DeleteStorageGroup		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:174:	ListVirtualSwitches		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:178:	GetVirtualSwitchProperties	0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:183:	CreateNic			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:186:	DeleteNic			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:189:	GetNicProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:192:	UpdateNicProperties		0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:197:	QueryJob			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:200:	DeleteJob			0.0%
github.com/zhmcclient/golang-zhmcclient/pkg/zhmcclient/zhmc.go:203:	CancelJob			0.0%
total:									(statements)			66.2%

}
})
Context("When ChangePassword is Executed", func() {
It("Check the result of ChangePassword", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it for bad path? can we have happy path?

@huoqifeng
Copy link

As this is a mirror from existing code, I'd approve and merge it.

Copy link

@huoqifeng huoqifeng left a comment

Choose a reason for hiding this comment

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

LGTM

@huoqifeng huoqifeng merged commit 9e814c2 into zhmcclient:master Oct 31, 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.

4 participants