mechboxes / mech

Easy command line virtual machines for VMWare
https://mechboxes.github.io/mech/
MIT License
311 stars 49 forks source link

show instance name when ssh-config command is run #64

Closed mkinney closed 4 years ago

mkinney commented 4 years ago

Resolves #63

$ mech ssh-config
Host centos8b
  User vagrant
  Port 22
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/mikekinney/.mech/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL
  HostName 192.168.2.237

$ mech ls | grep centos8b
            centos8b      192.168.2.237                      bento/centos-8  201912.04.0    /Users/mikekinney/Documents/python/mech/mkinney_mech
mkinney commented 4 years ago

@Kronuz Any interest in merging these PRs?

ColdHeat commented 4 years ago

This looks reasonable to me. I've been away from the codebase for sometime but I'm not clear on how self.instance_name appears to be set? Can you add an empty attribute in the classes to denote where it's actually being stored?

mkinney commented 4 years ago

Going to close this PR as I have a much large PR coming.