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

[resources/processes] add user(s), state(s) attribute #297

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

srenatus
Copy link
Contributor

@srenatus srenatus commented Dec 7, 2015

processes('bash').user will be non-nil iff the process owner of each
process is the same. Analogous for processes('bash').state.

These are the only two attributes where asking for them to be unique
among multiple processes makes sense.

The attributes 'users' and 'states' expose the values corresponding to
that property of each entry in the process list.

Fixes #295.

@chris-rock
Copy link
Contributor

@srenatus I think we should always return an array and simplify the resource api. At the same time we may need to adapt the documentation to reflect the array return value

@srenatus srenatus force-pushed the sr/bugfix295 branch 2 times, most recently from 8bb325e to 498d463 Compare December 8, 2015 11:44
@srenatus
Copy link
Contributor Author

srenatus commented Dec 8, 2015

@chris-rock I agree. Updated -- hope I didn't miss any docs.

processes('bash').user does not actually make much sense for a resource
that is a list -- different entries can belong to different users.
Analogous for processes('bash').state.

The attributes 'users' and 'states' expose the unique values
corresponding to that property of entries in the process list.

Fixes #295.
@chris-rock
Copy link
Contributor

@srenatus great improvement. Thank you very much!

chris-rock added a commit that referenced this pull request Dec 8, 2015
[resources/processes] add user(s), state(s) attribute
@chris-rock chris-rock merged commit 7a4e491 into master Dec 8, 2015
@chris-rock chris-rock deleted the sr/bugfix295 branch December 8, 2015 12:46
@chris-rock chris-rock removed the Type: Bug Feature not working as expected label Dec 11, 2015
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