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

This function was moved to GingerBase. It is not used in any part of Kimchi. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@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 -- 2.1.0

Reviewed-By: Lucio Correia <luciojhc@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@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
participants (3)
-
Aline Manera
-
Lucio Correia
-
Rodrigo Trujillo