<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-cloud-init.git/cloudinit/sources/tests/test_oracle.py, branch rolling</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=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-cloud-init.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/'/>
<updated>2021-12-03T20:11:46+00:00</updated>
<entry>
<title>Reorganize unit test locations under tests/unittests (#1126)</title>
<updated>2021-12-03T20:11:46+00:00</updated>
<author>
<name>Brett Holman</name>
<email>bholman.devel@gmail.com</email>
</author>
<published>2021-12-03T20:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51'/>
<id>urn:sha1:039c40f9b3d88ee8158604bb18ca4bf2fb5d5e51</id>
<content type='text'>
This attempts to standardize unit test file location under test/unittests/
such that any source file located at cloudinit/path/to/file.py may have a
corresponding unit test file at test/unittests/path/to/test_file.py.

Noteworthy Comments:
====================
Four different duplicate test files existed:
test_{gpg,util,cc_mounts,cc_resolv_conf}.py
Each of these duplicate file pairs has been merged together. This is a
break in git history for these files.

The test suite appears to have a dependency on test order. Changing test
order causes some tests to fail. This should be rectified, but for now
some tests have been modified in
tests/unittests/config/test_set_passwords.py.

A helper class name starts with "Test" which causes pytest to try
executing it as a test case, which then throws warnings "due to Class
having __init__()".  Silence by changing the name of the class.

# helpers.py is imported in many test files, import paths change
cloudinit/tests/helpers.py -&gt; tests/unittests/helpers.py

# Move directories:
cloudinit/distros/tests -&gt; tests/unittests/distros
cloudinit/cmd/devel/tests -&gt; tests/unittests/cmd/devel
cloudinit/cmd/tests -&gt; tests/unittests/cmd/
cloudinit/sources/helpers/tests -&gt; tests/unittests/sources/helpers
cloudinit/sources/tests -&gt; tests/unittests/sources
cloudinit/net/tests -&gt; tests/unittests/net
cloudinit/config/tests -&gt; tests/unittests/config
cloudinit/analyze/tests/ -&gt; tests/unittests/analyze/

# Standardize tests already in tests/unittests/
test_datasource -&gt; sources
test_distros -&gt; distros
test_vmware -&gt; sources/vmware
test_handler -&gt; config        # this contains cloudconfig module tests
test_runs -&gt; runs</content>
</entry>
<entry>
<title>Add connectivity_url to Oracle's EphemeralDHCPv4 (#988)</title>
<updated>2021-09-17T18:04:07+00:00</updated>
<author>
<name>James Falcon</name>
<email>therealfalcon@gmail.com</email>
</author>
<published>2021-09-17T18:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=612e39087aee3b1242765e7c4f463f54a6ebd723'/>
<id>urn:sha1:612e39087aee3b1242765e7c4f463f54a6ebd723</id>
<content type='text'>
Add connectivity_url to Oracle's EphemeralDHCPv4

On bionic, when trying to bring up the EphemeralDHCPv4, it's possible
that we already have a route defined, which will result in an error when
trying to add the DHCP route. Use the connectivity_url to check if we
can reach the metadata service, and if so, skip the EphemeralDHCPv4.

The has_url_connectivity function has also been modified to take
a dict of kwargs to send to readurl.

LP: #1939603</content>
</entry>
<entry>
<title>net: exclude OVS internal interfaces in get_interfaces (#829)</title>
<updated>2021-03-08T17:50:57+00:00</updated>
<author>
<name>Daniel Watkins</name>
<email>oddbloke@ubuntu.com</email>
</author>
<published>2021-03-08T17:50:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=121bc04cdf0e6732fe143b7419131dc250c13384'/>
<id>urn:sha1:121bc04cdf0e6732fe143b7419131dc250c13384</id>
<content type='text'>
`get_interfaces` is used to in two ways, broadly: firstly, to determine
the available interfaces when converting cloud network configuration
formats to cloud-init's network configuration formats; and, secondly, to
ensure that any interfaces which are specified in network configuration
are (a) available, and (b) named correctly.  The first of these is
unaffected by this commit, as no clouds support Open vSwitch
configuration in their network configuration formats.

For the second, we check that MAC addresses of physical devices are
unique.  In some OVS configurations, there are OVS-created devices which
have duplicate MAC addresses, either with each other or with physical
devices.  As these interfaces are created by OVS, we can be confident
that (a) they will be available when appropriate, and (b) that OVS will
name them correctly.  As such, this commit excludes any OVS-internal
interfaces from the set of interfaces returned by `get_interfaces`.

LP: #1912844</content>
</entry>
<entry>
<title>cloudinit: move dmi functions out of util (#622)</title>
<updated>2020-11-02T20:41:11+00:00</updated>
<author>
<name>Scott Moser</name>
<email>smoser@brickies.net</email>
</author>
<published>2020-11-02T20:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-cloud-init.git/commit/?id=0af1ff1eaf593c325b4f53181a572110eb016c50'/>
<id>urn:sha1:0af1ff1eaf593c325b4f53181a572110eb016c50</id>
<content type='text'>
This just separates the reading of dmi values into its own file.

Some things of note:
 * left import of util in dmi.py only for 'is_container'
   It'd be good if is_container was not in util.
 * just the use of 'util.is_x86' to dmi.py
 * open() is used directly rather than load_file.</content>
</entry>
<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>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>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>
</feed>
