Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixops
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 27fdbb510fed
Choose a base ref
...
head repository: NixOS/nixops
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2b63a9ae59e4
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on Apr 2, 2020

  1. Remove all references to Azure

    The backend is broken anyway and Azure support should be reimplemented
    as a plugin.
    adisbladis committed Apr 2, 2020
    1

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4cae6bc View commit details
  2. Merge pull request #1273 from adisbladis/azure-remove

    Remove all references to Azure
    grahamc authored Apr 2, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2b63a9a View commit details
Showing with 2 additions and 59 deletions.
  1. +0 −23 doc/manual/nixops.xml
  2. +1 −1 nix/eval-machine-info.nix
  3. +1 −15 nixops/deployment.py
  4. +0 −3 setup.cfg
  5. +0 −10 tests/functional/single_machine_azure_base.nix
  6. +0 −7 tests/functional/single_machine_test.py
23 changes: 0 additions & 23 deletions doc/manual/nixops.xml
Original file line number Diff line number Diff line change
@@ -262,29 +262,6 @@ cloud.</para>

</varlistentry>

<varlistentry><term><envar>AZURE_SUBSCRIPTION_ID</envar></term>
<term><envar>AZURE_AUTHORITY_URL</envar></term>
<term><envar>AZURE_USER</envar></term>
<term><envar>AZURE_SERVICE_PRINCIPAL</envar></term>
<term><envar>AZURE_PASSWORD</envar></term>

<listitem><para>Azure subscription ID, authority URL, user,
service principal and password.
Used if not set in an Azure machine deployment configuration via
<varname>deployment.azure.subscriptionId</varname>,
<varname>deployment.azure.authority</varname>,
<varname>deployment.azure.user</varname>,
<varname>deployment.azure.servicePrincipal</varname>
and <varname>deployment.azure.password</varname>,
and if not set in an Azure resource specification via
<varname>resources.$TYPE.$NAME.subscriptionId</varname>,
<varname>resources.$TYPE.$NAME.authority</varname>,
<varname>resources.$TYPE.$NAME.user</varname>,
<varname>resources.$TYPE.$NAME.servicePrincipal</varname>
and <varname>resources.$TYPE.$NAME.password</varname>.
</para></listitem>
</varlistentry>

</variablelist>


2 changes: 1 addition & 1 deletion nix/eval-machine-info.nix
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ rec {

resource_used = res_set: resource:
resource_referenced
((flatten_resources res_set) ++ (attrValues azure_machines))
(flatten_resources res_set)
(value: value == resource )
true;

16 changes: 1 addition & 15 deletions nixops/deployment.py
Original file line number Diff line number Diff line change
@@ -500,13 +500,6 @@ def evaluate(self) -> None:
for x in tree.findall("attrs/attr[@name='machines']/attrs/attr"):
name = x.get("name")
cfg = config["machines"][name]
if cfg["targetEnv"] == "azure":
self.logger.warn(
"skipping Azure machine {}: the azure backend is now broken on nixops".format(
name
)
)
continue
defn = _create_definition(x, cfg, cfg["targetEnv"])
self.definitions[name] = defn

@@ -515,13 +508,6 @@ def evaluate(self) -> None:
res_type = x.get("name")
for y in x.findall("attrs/attr"):
name = y.get("name")
if "azure" in res_type:
self.logger.warn(
"skipping Azure resource {} of type {}: the azure backend is now broken on nixops".format(
name, res_type
)
)
continue
defn = _create_definition(
y, config["resources"][res_type][name], res_type
)
@@ -1720,7 +1706,7 @@ def _create_state(depl: Deployment, type: str, name: str, id: int) -> Any:
# Automatically load all resource types.
def _load_modules_from(dir: str) -> None:
for module in os.listdir(os.path.dirname(__file__) + "/" + dir):
if module[-3:] != ".py" or module == "__init__.py" or "azure" in module:
if module[-3:] != ".py" or module == "__init__.py":
continue
importlib.import_module("nixops." + dir + "." + module[:-3])

3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -4,9 +4,6 @@ no_implicit_optional = True
strict_optional = True
check_untyped_defs = True

[mypy-azure.*]
ignore_missing_imports = True

[mypy-boto.*]
ignore_missing_imports = True

10 changes: 0 additions & 10 deletions tests/functional/single_machine_azure_base.nix

This file was deleted.

7 changes: 0 additions & 7 deletions tests/functional/single_machine_test.py
Original file line number Diff line number Diff line change
@@ -31,13 +31,6 @@ def test_gce(self):
]
self.run_check()

@attr("azure")
def test_azure(self):
self.depl.nix_exprs = self.depl.nix_exprs + [
("{0}/single_machine_azure_base.nix".format(parent_dir))
]
self.run_check()

@attr("libvirtd")
def test_libvirtd(self):
self.depl.nix_exprs = self.depl.nix_exprs + [