Skip to content

Add a command to list processes #101

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

Merged
merged 1 commit into from
Apr 15, 2020
Merged

Add a command to list processes #101

merged 1 commit into from
Apr 15, 2020

Conversation

gssbzn
Copy link
Collaborator

@gssbzn gssbzn commented Apr 15, 2020

Proposed changes

Looks like atlas changed how we generate the id for the atlas host so I needed this command to get the new id format

Checklist

  • 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

mongocli atlas processes ls
[
	{
		"created": "2020-04-15T15:44:15Z",
		"groupId": "5e429f2e06822c6eac4d59c9",
		"hostname": "atlas-k11skw-shard-00-00.vnp8x.azure.mongodb-dev.net",
		"id": "atlas-k11skw-shard-00-00.vnp8x.azure.mongodb-dev.net:27017",
		"lastPing": "2020-04-15T17:12:55Z",
		"links": [
			{
				"rel": "self",
				"href": "https://cloud-dev.mongodb.com/api/atlas/v1.0/groups/5e429f2e06822c6eac4d59c9/processes/atlas-k11skw-shard-00-00.vnp8x.azure.mongodb-dev.net:27017"
			}
		],
		"port": 27017,
		"shardName": "",
		"replicaSetName": "atlas-k11skw-shard-0",
		"typeName": "REPLICA_PRIMARY",
		"version": "4.0.17"
	},
	{
		"created": "2020-04-15T15:44:15Z",
		"groupId": "5e429f2e06822c6eac4d59c9",
		"hostname": "atlas-k11skw-shard-00-01.vnp8x.azure.mongodb-dev.net",
		"id": "atlas-k11skw-shard-00-01.vnp8x.azure.mongodb-dev.net:27017",
		"lastPing": "2020-04-15T17:12:55Z",
		"links": [
			{
				"rel": "self",
				"href": "https://cloud-dev.mongodb.com/api/atlas/v1.0/groups/5e429f2e06822c6eac4d59c9/processes/atlas-k11skw-shard-00-01.vnp8x.azure.mongodb-dev.net:27017"
			}
		],
		"port": 27017,
		"shardName": "",
		"replicaSetName": "atlas-k11skw-shard-0",
		"typeName": "REPLICA_SECONDARY",
		"version": "4.0.17"
	},
	{
		"created": "2020-04-15T15:44:15Z",
		"groupId": "5e429f2e06822c6eac4d59c9",
		"hostname": "atlas-k11skw-shard-00-02.vnp8x.azure.mongodb-dev.net",
		"id": "atlas-k11skw-shard-00-02.vnp8x.azure.mongodb-dev.net:27017",
		"lastPing": "2020-04-15T17:12:55Z",
		"links": [
			{
				"rel": "self",
				"href": "https://cloud-dev.mongodb.com/api/atlas/v1.0/groups/5e429f2e06822c6eac4d59c9/processes/atlas-k11skw-shard-00-02.vnp8x.azure.mongodb-dev.net:27017"
			}
		],
		"port": 27017,
		"shardName": "",
		"replicaSetName": "atlas-k11skw-shard-0",
		"typeName": "REPLICA_SECONDARY",
		"version": "4.0.17"
	}
]

@@ -31,6 +31,8 @@ func AtlasBuilder() *cobra.Command {
cmd.AddCommand(AtlasBackupsBuilder())
cmd.AddCommand(AtlasEventsBuilder())
cmd.AddCommand(AtlasMeasurementsBuilder())
// cmd.AddCommand(AtlasLogsBuilder())
Copy link
Collaborator

Choose a reason for hiding this comment

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

[np] Can be removed now? Not blocking

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's what I was working on and could not use as I needed the new format, I'll merge away as the next PR will remove the comments

Copy link
Collaborator

@colm-quinn colm-quinn left a comment

Choose a reason for hiding this comment

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

LGTM, as far as I can tell without running it locally.

Copy link
Contributor

@robcarlan-mlab robcarlan-mlab left a comment

Choose a reason for hiding this comment

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

lgtm one small question about language

@@ -43,6 +44,8 @@ const (
DescribeCluster = "Describe a cluster."
ListClusters = "List clusters for a project."
UpdateCluster = "Update a MongoDB cluster in Atlas."
Processes = "Manage processes for your project."
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the language here always refer to a project?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This format was done as a favour from the docs team, I'll ask them to give this list of descriptions another go

@gssbzn gssbzn merged commit 0846f94 into master Apr 15, 2020
@gssbzn gssbzn deleted the atlas-process-list branch April 15, 2020 17:21
corryroot pushed a commit to corryroot/mongodb-atlas-cli that referenced this pull request Jun 15, 2023
…ongodb#101)

* (DOCSP-28106) Release notes and source constant updates for v1.5.1

* Sets submodule to atlascli/v1.5.1
corryroot pushed a commit to corryroot/mongodb-atlas-cli that referenced this pull request Jun 15, 2023
…ongodb#101) (mongodb#102)

* (DOCSP-28106) Release notes and source constant updates for v1.5.1

* Sets submodule to atlascli/v1.5.1
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.

3 participants