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

Igor sync #1169

Merged
merged 4 commits into from Aug 29, 2018
Merged

Igor sync #1169

merged 4 commits into from Aug 29, 2018

Conversation

@csymonds
Copy link
Contributor

@csymonds csymonds commented Aug 27, 2018

New igor command that will look for orphan reservation IDs in the Schedule data and attempt to purge them.

csymonds added 2 commits Aug 24, 2018
…scover orphan reservation IDs in the data file and list them. Also adding reservation ID to the logging events.
… the schedule unless the -l flag is present. If present, it will just notify of orphan IDs.
@csymonds csymonds requested a review from jcrussell Aug 27, 2018
OPTIONAL FLAGS:
-v Verbose - Prints additioanl information
`,

This comment has been minimized.

@jcrussell

jcrussell Aug 28, 2018
Contributor

Add line for what -l does?

}
// Go through the reservations and turn off IDs we know about
for _, r := range Reservations {
resIDs[r.ID] = false

This comment has been minimized.

@jcrussell

jcrussell Aug 28, 2018
Contributor

Instead you could delete(resIDs, r.ID) so that below you don't need to check the value of resIDs for the given k -- it should only be false.

…more sense. Simplifying orphan detection.
cmdSync.Flag.BoolVar(&subF, "f", false, "")
cmdSync.Flag.BoolVar(&force, "force", false, "")
cmdSync.Flag.BoolVar(&subD, "d", false, "")
cmdSync.Flag.BoolVar(&dryRun, "dry_run", false, "")

This comment has been minimized.

@jcrussell

jcrussell Aug 28, 2018
Contributor

Does this map the -dry-run? Has an underscore instead of hyphen.

This comment has been minimized.

@csymonds

csymonds Aug 29, 2018
Author Contributor

Weirdly, the hyphen was not working before, so I switched to underscore. But now it's working, so my problem must have been elsewhere. I'll switch back.

Copy link
Contributor

@jcrussell jcrussell left a comment

LGTM. I could be a stickler and ask for unit tests for getOrphanIDs and purgeFromSchedule but why start now?

@csymonds csymonds merged commit 12f2ddd into sandia-minimega:master Aug 29, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jcrussell jcrussell mentioned this pull request Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.