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

Conversation

Projects
None yet
2 participants
@csymonds
Contributor

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 some commits Aug 24, 2018

igor: Adding in the sync API. This initial version will attempt to di…
…scover orphan reservation IDs in the data file and list them. Also adding reservation ID to the logging events.
igor: sync - sync will now automatically try to purge orphan IDs from…
… 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.

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

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.

@jcrussell

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment