-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESX Agent Manager (EAM) Client and Simulator
This patch introduces the bindings, client, and simulator for the ESX Agent Manager (EAM). EAM is a long-lived service on vCenter that acts as an intermediary for provisioning agent virtual machines and VIB modules on behalf of the user. The following packages include: * ./eam - the EAM client * ./eam/types - the EAM bindings - types * ./eam/methods - the EAM bindings - methods * ./eam/object - the EAM helper objects, ie. more than just MoRefs * ./eam/simulator - the EAM simulator For more information on how to use EAM, please see the public, EAM SDK at http://bit.ly/eam-sdk. This patch also updates the vC Simulator code so when containers are deployed as VMs, goroutines are created to monitor the containers and automatically update the runtime properties of the VM to match the underlying state of the container, such as power state, IP addr, etc.
- Loading branch information
Showing
34 changed files
with
5,137 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ESX Agent Manager (EAM) | ||
|
||
ESX Agent Manager ([EAM](https://vdc-download.vmware.com/vmwb-repository/dcr-public/3d076a12-29a2-4d17-9269-cb8150b5a37f/8b5969e2-1a66-4425-af17-feff6d6f705d/SDK/eam/doc/index.html)) is a long-lived service on vCenter that acts as an intermediary for provisioning agent virtual machines and VIB modules on behalf of the user. | ||
|
||
## HowTo | ||
|
||
Please refer to [`simulator/simulator_test.go`](./simulator/simulator_test.go) for an example on how to use this package. | ||
|
||
## Simulator | ||
|
||
The [`simulator`](./simulator/) package provides an EAM simulator that can even simulate the lifecycle of agent VMs using containers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
Copyright (c) 2021 VMware, Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package eam | ||
|
||
import ( | ||
"github.com/vmware/govmomi/vim25" | ||
"github.com/vmware/govmomi/vim25/soap" | ||
) | ||
|
||
const ( | ||
// Namespace is the namespace for EAM SOAP operations. | ||
Namespace = "eam" | ||
|
||
// Path is the path to the EAM service. | ||
Path = "/eam/sdk" | ||
) | ||
|
||
// Client is a client for the ESX Agent Manager API. | ||
type Client struct { | ||
*soap.Client | ||
} | ||
|
||
// NewClient returns a new EAM client. | ||
func NewClient(c *vim25.Client) *Client { | ||
return &Client{ | ||
Client: c.Client.NewServiceClient(Path, Namespace), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Copyright (c) 2021 VMware, Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package eam | ||
|
||
import ( | ||
"github.com/vmware/govmomi/eam/internal" | ||
"github.com/vmware/govmomi/vim25/types" | ||
) | ||
|
||
var EsxAgentManager = types.ManagedObjectReference{ | ||
Type: internal.EsxAgentManager, | ||
Value: internal.EsxAgentManager, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
Copyright (c) 2021 VMware, Inc. All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package internal | ||
|
||
const ( | ||
// EamObject is the managed object type for the EamObject base class. | ||
EamObject = "EamObject" | ||
|
||
// EsxAgentManager is both the managed object type and ID for the | ||
// EsxAgentManager class. | ||
EsxAgentManager = "EsxAgentManager" | ||
|
||
// Agency is the managed object type for the Agency class. | ||
Agency = "Agency" | ||
|
||
// Agent is the managed object type for the Agency class. | ||
Agent = "Agent" | ||
) |
Oops, something went wrong.