summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceSmartOS.py
AgeCommit message (Collapse)Author
2016-06-06Rebase against masterJoshua Harlow
2016-06-02fix untested previous change to smartosScott Moser
2016-06-02smartos: do not raise error when not on smartosScott Moser
if get_smartos_environ() returned a None, then the datasoure would raise a ValueError when get_data was called. Fix that.
2016-05-31use constants for kvm and lx-brandScott Moser
2016-05-27return dict not None on get_config_objScott Moser
2016-05-27smartos is local, but it is named DataSourceSmartOS not DataSourceConfigDriveScott Moser
2016-05-27Smartos datasource is local.Scott Moser
2016-05-27add nicer mainScott Moser
2016-05-27remove debug printScott Moser
2016-05-27fix pyflakes and flake8Scott Moser
2016-05-27fix the remaining testsScott Moser
2016-05-27fix a bunch of the testsScott Moser
2016-05-27fix pyflakes and some pylint errors/warningsScott Moser
2016-05-27fix pyflakes, move datasources= to bottomScott Moser
2016-05-26Move sdc:nics to a JSON map. Add unittest for sdc:nicsRyan Harper
2016-05-26Add smartos sdc:nics converter and network_config property for smartos ↵Ryan Harper
configdrive
2016-05-11Use a fake serial module that will allow tests to contineJoshua Harlow
Instead of aborting all serial using tests instead just create a serial module in cloudinit that will create a fake and broken serial class when pyserial is not actually installed. This allows for using the datasource and tests that exist in a more functional and tested manner (even when pyserial is not found).
2016-05-01initial commit of reworkScott Moser
2016-04-12SmartOS, CloudSigma: fix error when dmi data is not availbleScott Moser
In Cloudsigma, the datasource would warn if no product id was availble. SmartOS would log exception. This fixes both of those, changing the warning to a debug message. LP: #1569469
2016-03-04Apply pep8, pyflakes fixes for python2 and 3Scott Moser
Update make check target to run pep8 and run pyflakes or pyflakes3 depending on the value of 'PYVER'. This way the python3 build environment does not need python2 and vice versa. Also have make check run the 'yaml' test. tox: have tox run pep8 in the pyflakes
2016-03-03Update pep8 runner and fix pep8 issuesRyan Harper
2016-02-04SmartOS: Add support for Joyent LX-Brand Zones (LP: #1540965)Robert Jennings
LX-brand zones on Joyent's SmartOS use a different metadata source (socket file) than the KVM-based SmartOS virtualization (serial port). This patch adds support for recognizing the different flavors of virtualization on SmartOS and setting up a metadata source file object. After the file object is created, the rest of the code for the datasource LP: #1540965
2015-03-25Compile SmartOS line-parsing regex once.Daniel Watkins
2015-03-25Add link to Joyent metadata specification.Daniel Watkins
2015-03-25Switch logging from info to debug level.Daniel Watkins
2015-03-25Ensure that the serial console is always closed.Daniel Watkins
2015-03-25Add logging to JoyentMetadataClient.Daniel Watkins
2015-03-25Convert DataSourceSmartOS to use v2 metadata.Daniel Watkins
2015-03-13Write and read bytes to/from the SmartOS serial console.Daniel Watkins
2015-01-27Respond to review:Barry Warsaw
- Refactor both the base64 encoding and decoding into utility functions. Also: - Mechanically fix some other broken untested code.
2015-01-26Trunk merged and ported.Barry Warsaw
2015-01-26* More str/bytes fixes.Barry Warsaw
* Temporarily skip the MAAS tests in py3 since they need to be ported to oauthlib.
2015-01-21Largely merge lp:~harlowja/cloud-init/py2-3 albeit manually because it seemedBarry Warsaw
to be behind trunk. `tox -e py27` passes full test suite. Now to work on replacing mocker.
2015-01-14Drop reliance on dmidecode executable.Ben Howard
2014-08-26fix(pep8): Fix various pep8 violations and version-lock pep8Jay Faulkner
Fixed all complaints from running "make pep8". Also version locked pep8 in test-requirements.txt to ensure that pep8 requirements don't change without an explicit commit.
2014-06-02SmartOS test: do not require existance of /dev/ttyS1.Scott Moser
LP: #1316597
2014-02-26pep8 and pylintScott Moser
2014-02-26SmartOS: do not run on arm as dmidecode causes problemsScott Moser
See LP: #1243287 for more information, but the easiest thing to do here is just not run smartos on arm. LP: #1243287
2014-02-14The symlink of /var/lib/cloud/instance is not created at the time that theBen Howard
datasource for SmartOS runs. This patch creates the instance's directory.
2014-02-13re-work vendor-data and smartosScott Moser
This reduces how much cloud-init is explicitly involved in what "vendor-data" could accomplish. The goal of vendor-data was to provide the vendor with a channel to run arbitrary code that accomodate for their specific platform. Much of those accomodations are currently being done in cloud-init. However, this now moves some of those things to default "vendor-data", instead of cloud-init proper. Basically, now we have an 'sdc:vendor-data' key in the metadata. If that does not exist, then cloud-init will use the default. The default, provides a boothook. That boothook writes a file into /var/lib/cloud/per-boot/ . That file will be both written on every boot and then executed at rc.local time frame (by 'scripts-per-boot'). It will then execute /var/lib/cloud/instance/data/user-script and /var/lib/cloud/instance/data/operator-script if they exist. So, the things that cloud-init is now doing outside of the default vendor-data that I would rather be done in vendor-data is: * managing the population of instance/data/user-script and instance/data/operator-script. These could very easily be done from the boothook, but doing them in cloud-init removes the necessity for having a 'mdata-get' command in the image (or some other way for the boothook script to query the datasource). * managing the LEGACY things.
2014-02-13Define default vendordata for SmartOS. In absence of a vendordata, use aBen Howard
default #cloud-config that writes per-boot script that fetches subsequent sdc:operator-scripts and executes it.
2014-01-24minor changes for pylint, write_boot_content improvement.Scott Moser
if write_boot_content is given somethign that starts with #!, then there isn't a reason to invoke 'file' to tell us that it starts with shebang. This way, we only run file in 2 cases: a.) binary content (don't really know if that is supported or not) b.) magic "user meant to run this with /bin/bash but couldn't be bothered to type that"
2014-01-24Make SmartOS script handling self-contained in datasource.Ben Howard
2014-01-24Fixed flip-flopped commentBen Howard
2014-01-24Fixes for SmartOS datasource (LP: #1272115):Ben Howard
1. fixed conflation of user-data and cloud-init user-data. Cloud-init user-data is now namespaced as 'cloud-init:user-data'. 2. user-scripts are now fetched from the meta-data service each boot and executed as in the scripts directory 3. datacenter name is now namespaced as sdc:datacenter 4. user-scripts should be shebanged if there is no file magic
2014-01-16Fixed typosBen Howard
2014-01-09Added vendordata to SmartOSBen Howard
2013-11-07Change SmartOS verb for availability zone (LP: #1249124)Ben Howard
2013-10-07trim trailing whitespace on smartos hostname when it came from dmidecode.Scott Moser
LP: #1236445
2013-10-07Fixed SmartOS hostname whitespace bug (LP: #1236445).Ben Howard