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

Add host with ipv6 #75

Merged
merged 1 commit into from
Oct 21, 2016
Merged

Conversation

vkondula
Copy link

You can add host using ipv6
Always try to resolve FQDN. Before if you created host
with domain name but not fully qualified it was stored
as fqdn
Add ability to find default ipv6 for gateway.
Add ability to find ipv6 by interface
fixes: #56

@vkondula
Copy link
Author

reverts: #62, reason in commit msg

@codecov-io
Copy link

codecov-io commented Oct 10, 2016

Current coverage is 74.75% (diff: 90.00%)

Merging #75 into master will increase coverage by 0.55%

@@             master        #75   diff @@
==========================================
  Files            16         16          
  Lines          1438       1454    +16   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1067       1087    +20   
+ Misses          371        367     -4   
  Partials          0          0          

Powered by Codecov. Last update 849feff...c81cd98

@lukas-bednar
Copy link
Member

Looks good to me 👍

@myakove can you take a look at it?

@lukas-bednar lukas-bednar added this to the 0.1.5 milestone Oct 12, 2016
:return: IP or None
:rtype: string or None
"""
out = self._cmd(["ip", "addr", "show", interface])
Copy link

Choose a reason for hiding this comment

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

You can use -6 here too
ip -6 addr show

Copy link
Author

Choose a reason for hiding this comment

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

Done.

default_gw = re.findall(
r'(?<=\s)[0-9a-fA-F:]{3,}(?=\s)', i
)
if netaddr.valid_ipv6(default_gw[0]):
Copy link

Choose a reason for hiding this comment

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

Do you need this check since we get the IP from ip -6 command?

Copy link
Author

Choose a reason for hiding this comment

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

I would prefer to keep it there, if the regex fails to match the address correctly.

You can add host using ipv6
Always try to resolve FQDN. Before if you created host
 with domain name but not fully qualified it was stored
 as fqdn
Add ability to find default ipv6 for gateway.
Add ability to find ipv6 by interface
@lukas-bednar lukas-bednar merged commit a5b2751 into rhevm-qe-automation:master Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support IPv6
4 participants