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

Fix floaty list --active for vmpooler api v2 #169

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

yachub
Copy link

@yachub yachub commented Mar 20, 2023

Fixes list --active command, which was not updated for vmpooler api v2. If a vmpooler service URL in ~/.vmfloaty.yml ended with /api/v2, the following output was observed:

> floaty list --active
Your VMs on vmpooler.example.com:
- spicy-proton. (running, fedora-36-x86_64, 6.23/12 hours)

This will now correctly report:

> floaty list --active
Your VMs on vmpooler.example.com:
- spicy-proton.vmpooler.example.com (running, fedora-36-x86_64, 6.89/12 hours)

@yachub yachub added the bug label Mar 20, 2023
@yachub yachub requested a review from a team as a code owner March 20, 2023 18:07
Copy link

@e-gris e-gris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wholly optional, current style preference would be

# For backwards compatibility with vmpooler api v1

message = if host_data['domain']
            "- #{hostname}.#{host_data['domain']} (#{metadata.join(', ')})"
              .gsub(/^/, ' ' * indent)
          else
            "- #{host_data['fqdn']} (#{metadata.join(', ')})"
              .gsub(/^/, ' ' * indent)
        end

@yachub yachub force-pushed the fix-vmpooler-api-v2-active branch from 931ba27 to d5d87ed Compare March 20, 2023 19:06
@yachub yachub merged commit 90437dd into main Mar 20, 2023
@yachub yachub deleted the fix-vmpooler-api-v2-active branch March 20, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants