Bug 1195624 - Rhevm-shell does not support DNS aliasses
Summary: Rhevm-shell does not support DNS aliasses
Keywords:
Status: CLOSED DUPLICATE of bug 1186365
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.5.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-24 08:24 UTC by Roman Hodain
Modified: 2015-02-24 08:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-24 08:52:45 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Roman Hodain 2015-02-24 08:24:23 UTC
Description of problem:
When an alias from /etc/hosts file is used shell is not able to connect to the API

Version-Release number of selected component (if applicable):
rhevm-cli-3.5.0.5-1.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. set a new alias for RHEV-M
2. try to connect via this alias

Actual results:
Alias="rhevm35"
"https://rhevm35:443/ovirt-engine/api" is invalid url format, valid format is http[s]://server:port/path, where path is usually "ovirt-engine/api" or, for older versions of the engine, just "api".


Expected results:
The system either allow to use the alias or it provide more information about the URL format

Additional info:
The shell expect FQDN so rhevm35.example.com works.

from the code:

src/ovirtcli/command/connect.py:

    def is_valid_url(self, url):
        if url is None:
            return False;
        #self.error(url)
        regex = re.compile(
            r'^(?:http)s?://'  # http:// or https://
            r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'  # domain...
            r'localhost|'  # localhost...
            r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'  # ...or ipv4
            r'\[?[A-F0-9]*:[A-F0-9:]+\]?)'  # ...or ipv6
            r'(?::\d+)?'  # optional port
           , re.IGNORECASE)
        if not regex.search(url):
            return False

Comment 1 Juan Hernández 2015-02-24 08:52:45 UTC

*** This bug has been marked as a duplicate of bug 1186365 ***


Note You need to log in before you can comment on or make changes to this bug.