Created
August 20, 2012 15:19
-
-
Save abutcher/3405106 to your computer and use it in GitHub Desktop.
Juicer Scrum 08/20/2012
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/juicer/admin/JuicerAdmin.py b/juicer/admin/JuicerAdmin.py | |
| index fc4aabe..f081a6e 100644 | |
| --- a/juicer/admin/JuicerAdmin.py | |
| +++ b/juicer/admin/JuicerAdmin.py | |
| @@ -29,6 +29,8 @@ class JuicerAdmin(object): | |
| (self.connectors, self._defaults) = juicer.utils.get_login_info() | |
| + # vvv THIS IS BAD. WE SHOULD NOT BE EXITING EVAR. PLZ2 Exception. | |
| + | |
| if 'envs' in self.args: | |
| for env in self.args.envs: | |
| try: | |
| diff --git a/juicer/admin/Parser.py b/juicer/admin/Parser.py | |
| index 06e6e38..3ea165f 100644 | |
| --- a/juicer/admin/Parser.py | |
| +++ b/juicer/admin/Parser.py | |
| @@ -232,6 +232,8 @@ class Parser(object): | |
| parser_list_roles.set_defaults(ja=juicer.admin.list_roles) | |
| +# vvvv MOVE THAT TO UTIL. LOL | |
| + | |
| class PromptAction(argparse.Action): | |
| def __call__(self, parser, namespace, values, option_string=None): | |
| # If no value then we need to prompt for it... | |
| diff --git a/juicer/common/Cart.py b/juicer/common/Cart.py | |
| index 1b34f01..6decf64 100644 | |
| --- a/juicer/common/Cart.py | |
| +++ b/juicer/common/Cart.py | |
| @@ -80,6 +80,8 @@ class Cart(object): | |
| juicer.utils.Log.log_error(e.message) | |
| exit(1) | |
| + # ^ WHY U EXIT? | |
| + | |
| self.name = cart_body['name'] | |
| if cart_body['current_env'] == '': | |
| @@ -191,3 +193,7 @@ class Cart(object): | |
| output['repos_items'] = repos_items | |
| return output | |
| + | |
| + | |
| + # ^ We should use __str__ or __repr__ something like that... | |
| + # Dictionaries. Not cool brah. | |
| diff --git a/juicer/common/Constants.py b/juicer/common/Constants.py | |
| index 3cbd42a..56b174f 100644 | |
| --- a/juicer/common/Constants.py | |
| +++ b/juicer/common/Constants.py | |
| @@ -70,6 +70,9 @@ MAGIC_RPM_BIN = "RPM v3.0 bin i386/x86_64" | |
| MAGIC_RPM_NOARCH_BIN = "RPM v3.0 bin noarch" | |
| MAGIC_RPM_SRC = "RPM v3.0 src" | |
| +# ^ Do we need these anymo? Use rpm python. Owner: tbielawa | |
| +# Also port is_rpm | |
| + | |
| ###################################################################### | |
| # Locations we may reference a few times. | |
| CART_LOCATION = os.path.expanduser("~/.juicer-carts") | |
| diff --git a/juicer/juicer/Juicer.py b/juicer/juicer/Juicer.py | |
| index e1c63cf..9726898 100644 | |
| --- a/juicer/juicer/Juicer.py | |
| +++ b/juicer/juicer/Juicer.py | |
| @@ -44,6 +44,9 @@ class Juicer(object): | |
| # starts the 3-step upload process | |
| def _init_up(self, query='/services/upload/', name='', cksum='', size='', \ | |
| + | |
| + # Let's standardize how we do default args. NONE? | |
| + | |
| env=''): | |
| data = {'name': name, | |
| 'checksum': cksum, | |
| @@ -52,6 +55,8 @@ class Juicer(object): | |
| if env == '': | |
| env = self._defaults['cart_dest'] | |
| + # Make 'cart_dest' be start_in or default_environment or something like that. | |
| + | |
| _r = self.connectors[env].post(query, data) | |
| uid = juicer.utils.load_json_str(_r.content)['id'] | |
| @@ -128,6 +133,8 @@ class Juicer(object): | |
| # initiate upload | |
| upload_id = self._init_up(name=package_basename, cksum=cksum, size=size) | |
| + # vvv REMOVE THAT IF AND PUT IT IN THE PBAR BRO | |
| + | |
| #create a statusbar | |
| if juicer.utils.Log.LOG_LEVEL_CURRENT == 1: | |
| pbar = ProgressBar(size) | |
| @@ -315,6 +322,9 @@ class Juicer(object): | |
| if cart.name == 'upload-cart': | |
| continue | |
| + # For stuff like this, we should subclass cart and push it | |
| + # up there and not have the logic here. Brah. | |
| + | |
| links = [(item, juicer.utils.remote_url(self.connectors[env], env, repo, os.path.basename(item))) for item in items] | |
| for item, link in links: | |
| cart._update(repo, item, link) | |
| @@ -407,6 +417,7 @@ class Juicer(object): | |
| """ | |
| `cart_name` - Name of this release cart | |
| `cart_description` - list of ['reponame', item1, ..., itemN] lists | |
| + | |
| """ | |
| cart = juicer.common.Cart.Cart(cart_name) | |
| @@ -434,6 +445,11 @@ class Juicer(object): | |
| juicer.utils.Log.log_debug('Downloading all carts...') | |
| + # Why u download all cart? This is going to get slow when we | |
| + # have a shitload of carts. | |
| + | |
| + # Search 2 big. | |
| + | |
| # download all cart (json) files and set up variables for use | |
| cart_dest = self._defaults['cart_dest'] | |
| @@ -572,6 +588,9 @@ class Juicer(object): | |
| juicer.common.RpmSignPlugin. If available, we'll call | |
| rpm_sign_plugin.sign_rpms(rpm_files) and return. | |
| """ | |
| + | |
| + # Change these to notice level... and check if they're standardized. | |
| + | |
| juicer.utils.Log.log_debug("%s requires RPM signatures ... checking for rpm_sign_plugin definition ...", env) | |
| module_name = self._defaults['rpm_sign_plugin'] | |
| if self._defaults['rpm_sign_plugin']: | |
| diff --git a/juicer/juicer/__init__.py b/juicer/juicer/__init__.py | |
| index 0ead477..ed557f6 100644 | |
| --- a/juicer/juicer/__init__.py | |
| +++ b/juicer/juicer/__init__.py | |
| @@ -32,6 +32,9 @@ def create(args): | |
| else: | |
| raise Exception("Argument Error") | |
| + # We need a standard argument error with better descriptions. WRT | |
| + # THE ABOVE. | |
| + | |
| juicer.utils.Log.log_info("Saved cart '%s'." % args.cartname) | |
| print cart | |
| @@ -39,6 +42,8 @@ def create(args): | |
| def edit(): | |
| pass | |
| +# MAKE ISSUE FOR DIS. Respect the editor variable. ^^^ THAT EDIT THING. | |
| + | |
| def show(args): | |
| pulp = j(args) | |
| @@ -54,6 +59,8 @@ def pull(args): | |
| def createlike(): | |
| pass | |
| +# MAKE ISSUE FOR DIS. | |
| + | |
| def push(args): | |
| pulp = j(args) | |
| diff --git a/juicer/utils/__init__.py b/juicer/utils/__init__.py | |
| index e893744..64c065d 100644 | |
| --- a/juicer/utils/__init__.py | |
| +++ b/juicer/utils/__init__.py | |
| @@ -484,6 +484,9 @@ def parse_manifest(manifest): | |
| rpm_list = [] | |
| regex = re.compile('(.*): (?:(absent)|(?:(.*)-(.*)))') | |
| + # ^ is this heavily tested? Is there a builtin for that? Yaml | |
| + # stuff, probably. Look in versionmerge. | |
| + | |
| for line in open(manifest): | |
| _m = re.match(regex, line) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment