`cfy profiles use` can use cluster settings of the previous profile

Description

The https/http-detecting request in `cfy profiles use` doesn't pass cluster= to the get_rest_client() call, so it will end up using the cluster list from the previously-activated profile.

Repro of a bug caused by this:
1. Create one manager with ssl on and one with ssl off
2. `cfy profiles use` the ssl one
3. Start a cluster on it
4. Try to `cfy profiles use` the other one

Expected behaviour:
A profile is created with rest_port=80

What happens instead:
Port 443 is chosen instead, and the request fails

Status

Assignee

Łukasz Maksymczuk

Reporter

Łukasz Maksymczuk

Labels

Bug Type

None

Target Version

None

Severity

None

Fix versions

Affects versions

Configure