Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
consumer: Implement the util methods (they raise NotImplementError now)
Browse files Browse the repository at this point in the history
Signed-off-by: Sayan Chowdhury <[email protected]>
  • Loading branch information
sayanchowdhury committed Jul 12, 2017
1 parent b0b3569 commit 4a081a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fedimg/services/ec2/ec2imgpublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#

from fedimg.utils import external_run_command, get_item_from_regex
from fedimg.ec2.ec2base import EC2Base
from fedimg.services.ec2.ec2base import EC2Base


class EC2ImagePublisher(EC2Base):
Expand Down
2 changes: 1 addition & 1 deletion fedimg/services/ec2/ec2imguploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import re

from fedimg.utils import external_run_command, get_item_from_regex
from fedimg.ec2.ec2base import EC2Base
from fedimg.services.ec2.ec2base import EC2Base


class EC2ImageUploader(EC2Base):
Expand Down
13 changes: 12 additions & 1 deletion fedimg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_rawxz_urls(location, images):
return map((lambda path: '{}/{}'.format(location, path)), rawxz_list)


def virt_types_from_url(url):
def get_virt_types_from_url(url):
""" Takes a URL to a .raw.xz image file) and returns the suspected
virtualization type that the image file should be registered as. """
file_name = url.split('/')[-1].lower()
Expand Down Expand Up @@ -98,3 +98,14 @@ def safeget(dct, *keys):
except KeyError:
return None
return dct

def external_run_command(command):
raise NotImplementedError


def get_item_from_regex(regex, output):
raise NotImplementedError


def get_source_for_image(image_url):
raise NotImplementedError

0 comments on commit 4a081a7

Please sign in to comment.