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

Sync commands #495

Merged
merged 4 commits into from
Oct 13, 2020
Merged

Sync commands #495

merged 4 commits into from
Oct 13, 2020

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Oct 13, 2020

Proposed changes

Jira ticket: CLOUDP-73738
Jira ticket: CLOUDP-73739
Jira ticket: CLOUDP-73740
Jira ticket: CLOUDP-73741
Jira ticket: CLOUDP-73742

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

LIST

./bin/mongocli om admin backup sync list -P ops
NAME   URI                         SSL     LOAD FACTOR
test   mongodb://localhost:27017   false   1
./bin/mongocli om admin backup sync list -P ops -o json
{
  "links": [
    {
      "rel": "self",
      "href": "http://localhost:8080/api/public/v1.0/admin/backup/sync/mongoConfigs?pageNum=1\u0026itemsPerPage=100"
    }
  ],
  "results": [
    {
      "id": "test",
      "uri": "mongodb://localhost:27017",
      "labels": [
        "l1",
        "l2"
      ],
      "ssl": false,
      "assignmentEnabled": true,
      "encryptedCredentials": false,
      "loadFactor": 1,
      "maxCapacityGB": 8
    }
  ],
  "totalCount": 1
}

DESCRIBE

./bin/mongocli om admin backup sync describe test -P ops
NAME   URI                         SSL     LOAD FACTOR
test   mongodb://localhost:27017   false   1
./bin/mongocli om admin backup sync describe test -P ops -o json
{
  "id": "test",
  "uri": "mongodb://localhost:27017",
  "labels": [
    "l1",
    "l2"
  ],
  "ssl": false,
  "assignmentEnabled": true,
  "encryptedCredentials": false,
  "loadFactor": 1,
  "maxCapacityGB": 8
}

CREATE

./bin/mongocli om admin backup sync create --name test22 --uri mongodb://localhost:27017 --label l1 --assignment --loadFactor 1 -P ops
Sync configuration 'test22' created.
./bin/mongocli om admin backup sync create --name test22 --uri mongodb://localhost:27017 --label l1 --assignment --loadFactor 1 -P ops -o json
{
  "id": "test22",
  "uri": "mongodb://localhost:27017",
  "labels": [
    "l1"
  ],
  "ssl": false,
  "assignmentEnabled": true,
  "encryptedCredentials": false,
  "loadFactor": 1
}

UPDATE

./bin/mongocli om admin backup sync update test22 --uri mongodb://localhost:27017 --label l2 --assignment --loadFactor 1 -P ops
Sync configuration 'test22' updated.
./bin/mongocli om admin backup sync update test22 --uri mongodb://localhost:27017 --label l2 --assignment --loadFactor 1 -P ops -o json
{
  "id": "test22",
  "uri": "mongodb://localhost:27017",
  "labels": [
    "l2"
  ],
  "ssl": false,
  "assignmentEnabled": true,
  "encryptedCredentials": false,
  "loadFactor": 1
}

DELETE

./bin/mongocli om admin backup sync delete test22 -P ops
? Are you sure you want to delete: test22 Yes
Sync configuration 'test22' deleted

@andreaangiolillo andreaangiolillo marked this pull request as ready for review October 13, 2020 14:04
gssbzn
gssbzn previously approved these changes Oct 13, 2020
Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM

@andreaangiolillo andreaangiolillo merged commit 4268523 into master Oct 13, 2020
@andreaangiolillo andreaangiolillo deleted the CLOUDP-73738 branch October 13, 2020 15:45
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.

None yet

2 participants