Commit Graph

6 Commits (master)

Author SHA1 Message Date
Hervé Beraud 24245ce18e Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: Ib353cf9878334d91e551bf75121413c6fb2222ea
2020-06-09 19:28:11 +02:00
ricolin d1607f9f56 Add tls proxy support for Zaqar
Change-Id: I234a3d60333ee89a7c283b425e524d4624191577
2020-05-19 14:06:02 +00:00
Dan Prince b6364df3e5 Add support for Zaqar websockets
This patch adds a new zaqar.use_websockets option which if set to True
in the config file will configure the Zaqar collector to use
the websocket transport instead of wsgi. This can be more efficient
where you want to avoid the continuous polling of o-c-c and instead
just listen on the websocket that is subscribed to a queue.

Like other collectors each iteration creates a new socket object. This
allows us to use the normal re-exec logic in o-c-c and thus gives
the option to re-configure the agent in the future to use other types
of collectors. We could (optionally) look into a higher level option in
the future that would allow o-c-c to avoid re-exec'ing and thus re-use
the same websocket for multiple sets of metadata.

Depends-On: Ia2a8deb599252d8308e44d595eb2bf443999aaad
Change-Id: Id5c7ed590df776844b6c7961eb40f89206cd24e0
2016-11-30 21:12:47 -05:00
Steve Baker 61ff6aaec7 Use TEST-NET-1 for unit tests, not
Currently if http requests are not correctly mocked, behaviour of the
unit tests will depend on what happens to be running on localhost.

Jobs like gate-os-collect-config-python27-ubuntu-xenial are currently
broken because discover requests are being made to localhost and
something has change in the environment to cause test failure.

This change does the following:
- replace unit tests addresses from to (TEST-NET-1)
- fix mocking of tests which now stall because isn't accessable
- change the mocking approach to to
  a simple stub class

Change-Id: I6d9450d6854b9f50dac0f55f54f1ea1d579a27ac
2016-10-12 12:16:52 +13:00
Dan Prince 08ba371994 Merge deployments data for zaqar collectors
This is required so that a the TripleO undercloud can
switch to polling for metadata from a Zaqar rather than Heat or

Change-Id: Ieb076185314a7aeadd8a708ab01b48dfbccef006
Closes-bug: 1604098
2016-07-18 14:13:22 -04:00
Thomas Herve b13122918c Add support for zaqar transport
This adds a new zaqar collector able to read configuration from a
specific zaqar queue.

blueprint software-config-zaqar
Change-Id: Ie38af7b59e7a1aa370ac7760bb7819e37c2165c3
2015-08-26 11:33:10 +02:00