Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Fixes: #81

/go/src/github.com/pearl1594/cloudstack-cloudmonkey$ go run cmk.go
Apache CloudStack 🐵 CloudMonkey 6.1.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues

(localcloud) 🐱 > sync storagepool id=0bbd54fe-b348-3e3d-9b91-b453a21bc43a (PS2)
{
  "accountid": "6b71e9af-cf22-11eb-9edd-50eb7122da94",
  "cmd": "org.apache.cloudstack.api.command.admin.storage.SyncStoragePoolCmd",
  "completed": "2021-07-02T13:01:21+0530",
  "created": "2021-07-02T13:01:21+0530",
  "jobid": "0cd7299c-679a-4691-b990-1fce8f9ddf4f",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 431,
    "errortext": "SyncStoragePool API is currently supported only for storage type of datastore cluster"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "6b71f7f1-cf22-11eb-9edd-50eb7122da94"
}
🙈 Error: async API failed for job 0cd7299c-679a-4691-b990-1fce8f9ddf4f


(localcloud) 🐱 > sync
Discovered 604 APIs

@Pearl1594
Copy link
Contributor Author

@shwstppr @harikrishna-patnala Can you please help review/test this. Thanks

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

LGTM

cli/exec.go Outdated

command := cmd.FindCommand(args[0])
if command != nil {
if command != nil && ((args[0] == "sync" && len(args) == 1) || args[0] != "sync") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if command != nil && ((args[0] == "sync" && len(args) == 1) || args[0] != "sync") {
if command != nil && !(args[0] == "sync" && len(args) > 1) {

Shorter check

Copy link

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

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

Tested with datastore cluster storagepool, LGTM

@rohityadavcloud rohityadavcloud added this to the 6.2.0 milestone Jul 13, 2021
@rohityadavcloud rohityadavcloud merged commit c97233e into apache:main Aug 3, 2021
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.

Unable to use new syncStoragePool API

4 participants