juju-solutions / layer-apache-bigtop-base

Apache License 2.0
1 stars 5 forks source link

update bigtop repo handling (#43) #46

Closed kwmonroe closed 8 years ago

kwmonroe commented 8 years ago

This combines the 2 repo layer opts into 1 base repo url. We then construct the appropriate url using the deployed series and machine architecture.

At least, that's how it's supposed to work. At the moment, it seems there is no xenial repo, so for now, we hard code trusty and vivid as appropriate. Fortuantely, the trusty repo works for installing bigtop packages on xenial.

So, this PR adds the scaffolding to support proper run time construction of the repo url in the future.

While wiring this up, I noticed our hiera layer opts were poorly named/described, so I fixed that. Speaking of options, I noticed we were calling .options.get('opt') which does not fail like .options['opt'] when the option is missing. I made sure all required options used the [] syntax so we fail loudly if a required option is missing.

pengale commented 8 years ago

+1 after you get tox -c tox_unit.ini to pass :-)

kwmonroe commented 8 years ago

Good news, tox -c tox_unit.ini was easy breezy. Turns out, mock.patch was already setting up a MagicMock that handles dicts without issue.