[Kimchi-devel] [PATCH][Kimchi] Remove useless function 'validate_repo_url' from Kimchi

Lucio Correia luciojhc at linux.vnet.ibm.com
Tue Mar 15 14:30:15 UTC 2016


Reviewed-By: Lucio Correia <luciojhc at linux.vnet.ibm.com>

On 15-03-2016 10:44, Rodrigo Trujillo wrote:
> This function was moved to GingerBase. It is not used in any part of
> Kimchi.
>
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
> ---
>   utils.py | 16 ----------------
>   1 file changed, 16 deletions(-)
>
> diff --git a/utils.py b/utils.py
> index 87d7d9b..eae16d5 100644
> --- a/utils.py
> +++ b/utils.py
> @@ -87,22 +87,6 @@ def check_url_path(path, redirected=0):
>       return True
>
>
> -def validate_repo_url(url):
> -    url_parts = url.split('://')  # [0] = prefix, [1] = rest of URL
> -
> -    if url_parts[0] == '':
> -        raise InvalidParameter("KCHREPOS0002E")
> -
> -    if url_parts[0] in ['http', 'https', 'ftp']:
> -        if not check_url_path(url):
> -            raise InvalidParameter("WOKUTILS0001E", {'url': url})
> -    elif url_parts[0] == 'file':
> -        if not os.path.exists(url_parts[1]):
> -            raise InvalidParameter("WOKUTILS0001E", {'url': url})
> -    else:
> -        raise InvalidParameter("KCHREPOS0002E")
> -
> -
>   def upgrade_objectstore_data(item, old_uri, new_uri):
>       """
>           Upgrade the value of a given JSON's item of all Template and VM entries
>


-- 
Lucio Correia
Software Engineer
IBM LTC Brazil




More information about the Kimchi-devel mailing list