Skip to content
This repository was archived by the owner on Aug 10, 2024. It is now read-only.
This repository was archived by the owner on Aug 10, 2024. It is now read-only.

Consolidate multiple Azure plugins into AzCloud #164

@susam

Description

@susam

We seem to be having a proliferation of Azure cloud plugins. The Azure cloud plugins are heavyweight plugins because they launch multiple workers and threads. They also have overlapping concerns. For example, all of them iterate over all the subscriptions. Sometimes two of them iterate on the same type of resource. There is also a high configuration overhead because the same Azure credentials would need to be entered for each cloud plugin in the config file.

I am thinking we should change the AzCloud design a little bit so that the functionality of all other plugins become part of AzCloud plugin. Here's my proposal:

  • Move azsql.py, azvm.py, azwebapp, etc. to a library package, say, azreaders or azlib.
  • These individual modules no longer launch multiple threads and processes. They just yield each record in a single threaded manner.
  • AzCloud's worker method, i.e., _get_resources() invokes these modules in multiple processes and threads to retrieve the data.
  • The functionality of an individual module can be turned on and off via AzCloud's __init__() parameters. For example, in the params config of AzCloud, we can specify that things like we want azsql data to be pulled but we do not want azvm data to be pulled.

Note that we are similarly having a proliferation of event plugins but I think that's fine because the concerns of event plugins are much more isolated and they are very lightweight too.

This is a significant change, so I am looking for a consensus on this idea. If we have consensus, I am willing to perform the entire change myself, or if you prefer, distribute the change among ourselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions