Description of problem: In the UI, we can associate organization with a proxy. There does not appear to be a way to do that in the CLI, however. Would be nice to have. Something like hammer -u admin -p admin proxy create --name foobar --url https://example.com:9090 --add_org org_name hammer -u admin -p admin proxy create --name foobar --url https://example.com:9090 --remove_org org_name hammer -u admin -p admin proxy update --name foobar --remove_org org_name hammer -u admin -p admin proxy update --name foobar --remove_org org_name and even possibly comma-separated, e.g., --add_org NorthAmerica,EMEA,APAC Version-Release number of selected component (if applicable): Satellite-6.0.2-RHEL-6-20131023.1
It's possible to do this today via the organization subcommand, rather than the command for the resource you're associating, though I did just hit another bug while attempting it (http://projects.theforeman.org/issues/3499). Something like "hammer organization add_smartproxy ..." should work. Filed this as a feature too though, you should be able to do it at resource creation.
Upstream bug component is Hammer
Upstream bug component is Uncategorized
Fixed in satellite 6.2, hammer provides association options/commands for proxies that are consistent with other resources: [root@sat62 ~]# hammer proxy create -h Usage: hammer proxy create [OPTIONS] Options: --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. --locations LOCATION_NAMES Comma separated list of values. --name NAME --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. --organizations ORGANIZATION_NAMES Comma separated list of values. --url URL -h, --help print help [root@sat62 ~]# hammer proxy update -h Usage: hammer proxy update [OPTIONS] Options: --id ID --location-ids LOCATION_IDS REPLACE locations with given ids Comma separated list of values. --locations LOCATION_NAMES Comma separated list of values. --name NAME Name to search by --new-name NEW_NAME --organization-ids ORGANIZATION_IDS REPLACE organizations with given ids. Comma separated list of values. --organizations ORGANIZATION_NAMES Comma separated list of values. --url URL -h, --help print help [root@sat62 ~]# hammer organization -h | grep proxy add-smart-proxy Associate a smart proxy remove-smart-proxy Disassociate a smart proxy [root@sat62 ~]# hammer --version hammer (0.5.1.11) * hammer_cli_csv (unknown version) * hammer_cli_foreman (0.5.1.9) * hammer_cli_foreman_admin (0.0.5) * hammer_cli_foreman_bootdisk (0.1.3.3) * hammer_cli_foreman_discovery (0.0.2.3) * hammer_cli_foreman_docker (unknown version) * hammer_cli_foreman_remote_execution (unknown version) * hammer_cli_foreman_tasks (unknown version) * hammer_cli_import (0.11.2) * hammer_cli_katello (0.0.22.26)