Skip to content

Commit

Permalink
⭐️ equinix provider (#1574)
Browse files Browse the repository at this point in the history
The equinix provider supports both connecting to an org and to a
project:

cnquery shell equinix project 676a700e-2b06-48de-aba6-2fa7dd95cd0c
--token '<your-token>'

```
cnquery> equinix.metal.project { * }
equinix.metal.project: {
  createdAt: 2021-03-03 12:13:46 +0100 CET
  sshKeys: [
    0: equinix.metal.sshkey label="chris-rock"
  ]
  organization: equinix.metal.organization name="Example Inc"
  id: "69780ecb-fdf1-4e6d-aaa1-edba462ee4a1"
  name: "API Integration"
  devices: []
  updatedAt: 2023-08-27 11:36:21 +0200 CEST
  url: "/metal/v1/projects/69780ecb-fdf1-4e6d-aaa1-edba462ee4a1"
}
```

cnquery shell org project 676a700e-2b06-48de-aba6-2fa7dd95cd0c --token
'<your-token>'

```coffeescript
cnquery> equinix.metal.organization { name users }
equinix.metal.organization: {
  users: [
  0: equinix.metal.user email="chris@example.com"
  ]
  name: "Mondoo Inc"
}

```

A user token is preferred over a project token if you want to fetch
information from the organization.
  • Loading branch information
chris-rock authored Aug 27, 2023
1 parent f7a2278 commit 333fad4
Show file tree
Hide file tree
Showing 19 changed files with 1,649 additions and 538 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ providers/lr:
go build -o lr ./providers-sdk/v1/lr/cli/main.go

.PHONY: providers/build
providers/build: providers/build/core providers/build/network providers/build/os providers/build/ipmi providers/build/oci providers/build/slack providers/build/github providers/build/gitlab providers/build/terraform providers/build/vsphere providers/build/opcua providers/build/okta providers/build/google-workspace providers/build/arista
providers/build: providers/build/core providers/build/network providers/build/os providers/build/ipmi providers/build/oci providers/build/slack providers/build/github providers/build/gitlab providers/build/terraform providers/build/vsphere providers/build/opcua providers/build/okta providers/build/google-workspace providers/build/arista providers/build/equinix

providers/build/core: providers/lr
@$(call buildProvider, providers/core)
Expand Down Expand Up @@ -177,6 +177,9 @@ providers/build/google-workspace: providers/lr
providers/build/arista: providers/lr
@$(call buildProvider, providers/arista)

providers/build/equinix: providers/lr
@$(call buildProvider, providers/equinix)

providers/install:
# @$(call installProvider, providers/core)
@$(call installProvider, providers/network)
Expand All @@ -192,6 +195,7 @@ providers/install:
@$(call installProvider, providers/okta)
@$(call installProvider, providers/google-workspace)
@$(call installProvider, providers/arista)
@$(call installProvider, providers/equinix)

providers/bundle:
@$(call bundleProvider, providers/network)
Expand All @@ -207,6 +211,7 @@ providers/bundle:
@$(call bundleProvider, providers/okta)
@$(call bundleProvider, providers/google-workspace)
@$(call bundleProvider, providers/arista)
@$(call bundleProvider, providers/equinix)

providers/test:
@$(call testProvider, providers/core)
Expand All @@ -223,6 +228,7 @@ providers/test:
@$(call testGpModProvider, providers/okta)
@$(call testGpModProvider, providers/google-workspace)
@$(call testGpModProvider, providers/arista)
@$(call testGpModProvider, providers/equinix)

lr/test:
go test ./resources/lr/...
Expand Down
61 changes: 0 additions & 61 deletions _motor/discovery/equinix/resolver.go

This file was deleted.

8 changes: 0 additions & 8 deletions _motor/providers/equinix/platform.go

This file was deleted.

96 changes: 0 additions & 96 deletions _motor/providers/equinix/provider.go

This file was deleted.

Loading

0 comments on commit 333fad4

Please sign in to comment.