Description of problem:
Assuming a capsule (id:1) has only the dev (id:2) lifecycle environment attached, attempting to perform a synchronize with the prod (id:4) lifecycle environment will attempt to perform the synchonize.
hammer capsule synchronize --id 1 --environment-id 4
the server will attempt to sync environment 4, even if it is not associated with the capsule
the server should return an error to the user indicating that it is an invalid environment
Created redmine issue http://projects.theforeman.org/issues/6871 from this bug
Fix proposed in Katello PR:
This was delivered with Satellite 6.0 which was released on 10 September 2014.