<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/sources/tests, branch 20.3</title>
<subtitle> (mirror of https://github.com/vyos/vyos-cloud-init.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=20.3</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=20.3'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2020-08-14T15:37:33+00:00</updated>
<entry>
<title>DataSourceOracle: retry twice (and document why we retry at all) (#536)</title>
<updated>2020-08-14T15:37:33+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-08-14T15:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=2d3533b59c7bf00affbda9c2c94fb5f214ffcb11'/>
<id>urn:sha1:2d3533b59c7bf00affbda9c2c94fb5f214ffcb11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Support Oracle IMDSv2 API (#528)</title>
<updated>2020-08-13T19:38:37+00:00</updated>
<author>
<name>James Falcon</name>
<email>TheRealFalcon@users.noreply.github.com</email>
</author>
<published>2020-08-13T19:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=546617c449f2e973717191a07c243ec1b6bfc8da'/>
<id>urn:sha1:546617c449f2e973717191a07c243ec1b6bfc8da</id>
<content type='text'>
* v2 of the API is now default with fallback to v1.
* Refactored the Oracle datasource to fetch version, instance, and vnic metadata simultaneously.</content>
</entry>
<entry>
<title>DataSourceOracle: refactor to use only OPC v1 endpoint (#493)</title>
<updated>2020-08-10T19:11:23+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-08-10T19:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=a6bb375aef93a31395af9ce0985c49ada9fb7139'/>
<id>urn:sha1:a6bb375aef93a31395af9ce0985c49ada9fb7139</id>
<content type='text'>
The /opc/v1/ metadata endpoints[0] are universally available in Oracle
Cloud Infrastructure and the OpenStack endpoints are considered
deprecated, so we can refactor the data source to use the OPC endpoints
exclusively.  This simplifies the datasource code substantially, and
enables use of OPC-specific attributes in future.

[0] https://docs.cloud.oracle.com/en-us/iaas/Content/Compute/Tasks/gettingmetadata.htm</content>
</entry>
<entry>
<title>test: fix all flake8 E126 errors (#425)</title>
<updated>2020-06-10T14:39:29+00:00</updated>
<author>
<name>Joshua Powers</name>
<email>josh.powers@canonical.com</email>
</author>
<published>2020-06-10T14:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=f3bd42659efeed4b092ffcdfd5df7f24813f2d3e'/>
<id>urn:sha1:f3bd42659efeed4b092ffcdfd5df7f24813f2d3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cloudinit: drop dependencies on unittest2 and contextlib2 (#322)</title>
<updated>2020-04-24T13:26:51+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-04-24T13:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=38a7e6e9756fdab31264c0d6e93d20432ed111ac'/>
<id>urn:sha1:38a7e6e9756fdab31264c0d6e93d20432ed111ac</id>
<content type='text'>
These libraries provide backports of Python 3's stdlib components to Python 2. As we only support Python 3, we can simply use the stdlib now. This pull request does the following:

* removes some unneeded compatibility code for the old spelling of `assertRaisesRegex`
* replaces invocations of the Python 2-only `assertItemsEqual` with its new name, `assertCountEqual`
* replaces all usage of `unittest2` with `unittest`
* replaces all usage of `contextlib2` with `contextlib`
* drops `unittest2` and `contextlib2` from requirements files and tox.ini

It also rewrites some `test_azure` helpers to use bare asserts. We were seeing a strange error in xenial builds of this branch which appear to be stemming from the AssertionError that pytest produces being _different_ from the standard AssertionError.  This means that the modified helpers weren't behaving correctly, because they weren't catching AssertionErrors as one would expect. (I believe this is related, in some way, to https://github.com/pytest-dev/pytest/issues/645, but the only version of pytest where we're affected is so far in the past that it's not worth pursuing it any further as we have a workaround.)</content>
</entry>
<entry>
<title>tests: add missing mocks for get_interfaces_by_mac (#326)</title>
<updated>2020-04-20T18:50:37+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-04-20T18:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=d7cad8b61a3b5929a65202e0964aa9b4624e06c4'/>
<id>urn:sha1:d7cad8b61a3b5929a65202e0964aa9b4624e06c4</id>
<content type='text'>
We currently have a test system where get_interfaces_by_mac raises an
exception, which is causing these tests to fail as they aren't mocking
get_interfaces_by_mac out.

LP: #1873910</content>
</entry>
<entry>
<title>sources/tests/test_init: drop use of deprecated inspect.getargspec (#285)</title>
<updated>2020-03-27T15:45:45+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-27T15:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=1905ff47e9e688d9a48d6132fd45b341f2d66fe4'/>
<id>urn:sha1:1905ff47e9e688d9a48d6132fd45b341f2d66fe4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>test_oracle,DataSourceOracle: sort imports (#266)</title>
<updated>2020-03-20T19:51:07+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-20T19:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0173e852a760d2b9a697b5f07330a226839e350b'/>
<id>urn:sha1:0173e852a760d2b9a697b5f07330a226839e350b</id>
<content type='text'>
* test_oracle: sort imports

* DataSourceOracle: sort imports</content>
</entry>
<entry>
<title>cloudinit/tests: remove unneeded with_logs configuration (#263)</title>
<updated>2020-03-19T16:01:15+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2020-03-19T16:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=ade47866aa2f81ab0f3baabbb1fc1e484abdb741'/>
<id>urn:sha1:ade47866aa2f81ab0f3baabbb1fc1e484abdb741</id>
<content type='text'>
These classes don't use `self.logs` anywhere in their body, so we can
remove the `with_logs = True` setting from them.

These instances were found using astpath[0], with the following
invocation:

  astpath "//Name[@id='with_logs' and not(ancestor::ClassDef//Attribute[@attr='logs'])]"

[0] https://github.com/hchasestevens/astpath</content>
</entry>
<entry>
<title>instance-data: add cloud-init merged_cfg and sys_info keys to json (#214)</title>
<updated>2020-03-10T14:22:22+00:00</updated>
<author>
<name>Chad Smith</name>
<email>chad.smith@canonical.com</email>
</author>
<published>2020-03-10T14:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=71af48df3514ca831c90b77dc71ba0a121dec401'/>
<id>urn:sha1:71af48df3514ca831c90b77dc71ba0a121dec401</id>
<content type='text'>
Cloud-config userdata provided as jinja templates are now distro,
platform and merged cloud config aware. The cloud-init query command
will also surface this config data.

Now users can selectively render portions of cloud-config based on:
* distro name, version, release
* python version
* merged cloud config values
* machine platform
* kernel

To support template handling of this config, add new top-level
keys to /run/cloud-init/instance-data.json.

The new 'merged_cfg' key represents merged cloud config from
/etc/cloud/cloud.cfg and /etc/cloud/cloud.cfg.d/*.

The new 'sys_info' key which captures distro and platform
info from cloudinit.util.system_info.

Cloud config userdata templates can render conditional content
based on these additional environmental checks such as the following
simple example:

```
  ## template: jinja
  #cloud-config
   runcmd:
  {% if distro == 'opensuse' %}
    - sh /custom-setup-sles
  {% elif distro == 'centos' %}
    - sh /custom-setup-centos
  {% elif distro == 'debian' %}
    - sh /custom-setup-debian
  {% endif %}
```

To see all values: sudo cloud-init query --all

Any keys added to the standardized v1 keys are guaranteed to not
change or drop on future released of cloud-init. 'v1' keys will be retained
for backward-compatibility even if a new standardized 'v2' set of keys
are introduced

The following standardized v1 keys are added:
* distro, distro_release, distro_version, kernel_version, machine,
python_version, system_platform, variant

LP: #1865969</content>
</entry>
</feed>
