go.mod: update images to 0.11

Mainly to include:

- distro/rhel9: Make /boot 600 MiB big on RHEL 9.3+
- fedora: exclude sdubby
- Minimal image builds

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2023-10-06 10:00:29 +02:00 committed by Ondřej Budai
parent edc45fde72
commit 19edaca01a
213 changed files with 4113 additions and 3823 deletions

View file

@ -2572,21 +2572,81 @@ var awsPartition = partition{
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
Hostname: "appflow-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "appflow-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "appflow-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
Hostname: "appflow-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "appflow-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "appflow-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "appflow-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "appflow-fips.us-west-2.amazonaws.com",
},
},
},
"application-autoscaling": service{
@ -4408,6 +4468,118 @@ var awsPartition = partition{
},
},
},
"bedrock": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "bedrock-ap-northeast-1",
}: endpoint{
Hostname: "bedrock.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "bedrock-ap-southeast-1",
}: endpoint{
Hostname: "bedrock.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "bedrock-fips-us-east-1",
}: endpoint{
Hostname: "bedrock-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "bedrock-fips-us-west-2",
}: endpoint{
Hostname: "bedrock-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "bedrock-runtime-ap-northeast-1",
}: endpoint{
Hostname: "bedrock-runtime.ap-northeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-northeast-1",
},
},
endpointKey{
Region: "bedrock-runtime-ap-southeast-1",
}: endpoint{
Hostname: "bedrock-runtime.ap-southeast-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ap-southeast-1",
},
},
endpointKey{
Region: "bedrock-runtime-fips-us-east-1",
}: endpoint{
Hostname: "bedrock-runtime-fips.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "bedrock-runtime-fips-us-west-2",
}: endpoint{
Hostname: "bedrock-runtime-fips.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "bedrock-runtime-us-east-1",
}: endpoint{
Hostname: "bedrock-runtime.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "bedrock-runtime-us-west-2",
}: endpoint{
Hostname: "bedrock-runtime.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "bedrock-us-east-1",
}: endpoint{
Hostname: "bedrock.us-east-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-1",
},
},
endpointKey{
Region: "bedrock-us-west-2",
}: endpoint{
Hostname: "bedrock.us-west-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-2",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{},
endpointKey{
Region: "us-west-2",
}: endpoint{},
},
},
"billingconductor": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
@ -8007,6 +8179,185 @@ var awsPartition = partition{
},
},
},
"datazone": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
DNSSuffix: "api.aws",
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{
Hostname: "datazone.af-south-1.api.aws",
},
endpointKey{
Region: "ap-east-1",
}: endpoint{
Hostname: "datazone.ap-east-1.api.aws",
},
endpointKey{
Region: "ap-northeast-1",
}: endpoint{
Hostname: "datazone.ap-northeast-1.api.aws",
},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{
Hostname: "datazone.ap-northeast-2.api.aws",
},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{
Hostname: "datazone.ap-northeast-3.api.aws",
},
endpointKey{
Region: "ap-south-1",
}: endpoint{
Hostname: "datazone.ap-south-1.api.aws",
},
endpointKey{
Region: "ap-south-2",
}: endpoint{
Hostname: "datazone.ap-south-2.api.aws",
},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{
Hostname: "datazone.ap-southeast-1.api.aws",
},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{
Hostname: "datazone.ap-southeast-2.api.aws",
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{
Hostname: "datazone.ap-southeast-3.api.aws",
},
endpointKey{
Region: "ap-southeast-4",
}: endpoint{
Hostname: "datazone.ap-southeast-4.api.aws",
},
endpointKey{
Region: "ca-central-1",
}: endpoint{
Hostname: "datazone.ca-central-1.api.aws",
},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datazone-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{
Hostname: "datazone.eu-central-1.api.aws",
},
endpointKey{
Region: "eu-central-2",
}: endpoint{
Hostname: "datazone.eu-central-2.api.aws",
},
endpointKey{
Region: "eu-north-1",
}: endpoint{
Hostname: "datazone.eu-north-1.api.aws",
},
endpointKey{
Region: "eu-south-1",
}: endpoint{
Hostname: "datazone.eu-south-1.api.aws",
},
endpointKey{
Region: "eu-south-2",
}: endpoint{
Hostname: "datazone.eu-south-2.api.aws",
},
endpointKey{
Region: "eu-west-1",
}: endpoint{
Hostname: "datazone.eu-west-1.api.aws",
},
endpointKey{
Region: "eu-west-2",
}: endpoint{
Hostname: "datazone.eu-west-2.api.aws",
},
endpointKey{
Region: "eu-west-3",
}: endpoint{
Hostname: "datazone.eu-west-3.api.aws",
},
endpointKey{
Region: "il-central-1",
}: endpoint{
Hostname: "datazone.il-central-1.api.aws",
},
endpointKey{
Region: "me-central-1",
}: endpoint{
Hostname: "datazone.me-central-1.api.aws",
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "datazone.me-south-1.api.aws",
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
Hostname: "datazone.sa-east-1.api.aws",
},
endpointKey{
Region: "us-east-1",
}: endpoint{
Hostname: "datazone.us-east-1.api.aws",
},
endpointKey{
Region: "us-east-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "datazone-fips.us-east-1.amazonaws.com",
},
endpointKey{
Region: "us-east-2",
}: endpoint{
Hostname: "datazone.us-east-2.api.aws",
},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "datazone-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{
Hostname: "datazone.us-west-1.api.aws",
},
endpointKey{
Region: "us-west-2",
}: endpoint{
Hostname: "datazone.us-west-2.api.aws",
},
endpointKey{
Region: "us-west-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "datazone-fips.us-west-2.amazonaws.com",
},
},
},
"dax": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -11044,6 +11395,12 @@ var awsPartition = partition{
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "email-fips.ca-central-1.amazonaws.com",
},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
@ -11062,6 +11419,15 @@ var awsPartition = partition{
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "fips-ca-central-1",
}: endpoint{
Hostname: "email-fips.ca-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "ca-central-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-1",
}: endpoint{
@ -11071,6 +11437,24 @@ var awsPartition = partition{
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-east-2",
}: endpoint{
Hostname: "email-fips.us-east-2.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-east-2",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-1",
}: endpoint{
Hostname: "email-fips.us-west-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "us-west-1",
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-west-2",
}: endpoint{
@ -11101,9 +11485,21 @@ var awsPartition = partition{
endpointKey{
Region: "us-east-2",
}: endpoint{},
endpointKey{
Region: "us-east-2",
Variant: fipsVariant,
}: endpoint{
Hostname: "email-fips.us-east-2.amazonaws.com",
},
endpointKey{
Region: "us-west-1",
}: endpoint{},
endpointKey{
Region: "us-west-1",
Variant: fipsVariant,
}: endpoint{
Hostname: "email-fips.us-west-1.amazonaws.com",
},
endpointKey{
Region: "us-west-2",
}: endpoint{},
@ -14271,6 +14667,9 @@ var awsPartition = partition{
},
"inspector2": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "af-south-1",
}: endpoint{},
endpointKey{
Region: "ap-east-1",
}: endpoint{},
@ -14280,6 +14679,9 @@ var awsPartition = partition{
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-northeast-3",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
@ -14289,12 +14691,18 @@ var awsPartition = partition{
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-2",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
@ -17339,6 +17747,9 @@ var awsPartition = partition{
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
@ -17348,12 +17759,18 @@ var awsPartition = partition{
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-4",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-2",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
@ -17408,6 +17825,9 @@ var awsPartition = partition{
endpointKey{
Region: "il-central-1",
}: endpoint{},
endpointKey{
Region: "me-central-1",
}: endpoint{},
endpointKey{
Region: "me-south-1",
}: endpoint{},
@ -17620,6 +18040,9 @@ var awsPartition = partition{
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-south-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
@ -17629,12 +18052,18 @@ var awsPartition = partition{
endpointKey{
Region: "ap-southeast-3",
}: endpoint{},
endpointKey{
Region: "ap-southeast-4",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-2",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
@ -18834,12 +19263,30 @@ var awsPartition = partition{
},
"meetings-chime": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-1",
}: endpoint{},
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-south-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-1",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-west-2",
}: endpoint{},
endpointKey{
Region: "il-central-1",
}: endpoint{},
@ -20067,6 +20514,9 @@ var awsPartition = partition{
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "il-central-1",
}: endpoint{},
endpointKey{
Region: "me-central-1",
}: endpoint{},
@ -20519,6 +20969,14 @@ var awsPartition = partition{
},
Deprecated: boxedTrue,
},
endpointKey{
Region: "il-central-1",
}: endpoint{
Hostname: "omics.il-central-1.amazonaws.com",
CredentialScope: credentialScope{
Region: "il-central-1",
},
},
endpointKey{
Region: "us-east-1",
}: endpoint{
@ -23182,6 +23640,11 @@ var awsPartition = partition{
}: endpoint{
Hostname: "resource-explorer-2.ap-southeast-2.api.aws",
},
endpointKey{
Region: "ap-southeast-3",
}: endpoint{
Hostname: "resource-explorer-2.ap-southeast-3.api.aws",
},
endpointKey{
Region: "ap-southeast-4",
}: endpoint{
@ -23227,6 +23690,11 @@ var awsPartition = partition{
}: endpoint{
Hostname: "resource-explorer-2.il-central-1.api.aws",
},
endpointKey{
Region: "me-south-1",
}: endpoint{
Hostname: "resource-explorer-2.me-south-1.api.aws",
},
endpointKey{
Region: "sa-east-1",
}: endpoint{
@ -29159,15 +29627,30 @@ var awsPartition = partition{
},
"tnb": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "ap-northeast-2",
}: endpoint{},
endpointKey{
Region: "ap-southeast-2",
}: endpoint{},
endpointKey{
Region: "ca-central-1",
}: endpoint{},
endpointKey{
Region: "eu-central-1",
}: endpoint{},
endpointKey{
Region: "eu-north-1",
}: endpoint{},
endpointKey{
Region: "eu-south-2",
}: endpoint{},
endpointKey{
Region: "eu-west-3",
}: endpoint{},
endpointKey{
Region: "sa-east-1",
}: endpoint{},
endpointKey{
Region: "us-east-1",
}: endpoint{},
@ -32101,6 +32584,20 @@ var awscnPartition = partition{
},
},
},
"api.pricing": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
CredentialScope: credentialScope{
Service: "pricing",
},
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-northwest-1",
}: endpoint{},
},
},
"api.sagemaker": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -32518,6 +33015,31 @@ var awscnPartition = partition{
}: endpoint{},
},
},
"datazone": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
DNSSuffix: "api.amazonwebservices.com.cn",
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.amazonwebservices.com.cn",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "cn-north-1",
}: endpoint{
Hostname: "datazone.cn-north-1.api.amazonwebservices.com.cn",
},
endpointKey{
Region: "cn-northwest-1",
}: endpoint{
Hostname: "datazone.cn-northwest-1.api.amazonwebservices.com.cn",
},
},
},
"dax": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -35279,6 +35801,13 @@ var awsusgovPartition = partition{
},
},
},
"codestar-connections": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
},
},
"cognito-identity": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -35622,6 +36151,31 @@ var awsusgovPartition = partition{
},
},
},
"datazone": service{
Defaults: endpointDefaults{
defaultKey{}: endpoint{
DNSSuffix: "api.aws",
},
defaultKey{
Variant: fipsVariant,
}: endpoint{
Hostname: "{service}-fips.{region}.{dnsSuffix}",
DNSSuffix: "api.aws",
},
},
Endpoints: serviceEndpoints{
endpointKey{
Region: "us-gov-east-1",
}: endpoint{
Hostname: "datazone.us-gov-east-1.api.aws",
},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{
Hostname: "datazone.us-gov-west-1.api.aws",
},
},
},
"directconnect": service{
Endpoints: serviceEndpoints{
endpointKey{
@ -37652,6 +38206,36 @@ var awsusgovPartition = partition{
},
},
},
"m2": service{
Endpoints: serviceEndpoints{
endpointKey{
Region: "fips-us-gov-east-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "fips-us-gov-west-1",
}: endpoint{
Deprecated: boxedTrue,
},
endpointKey{
Region: "us-gov-east-1",
}: endpoint{},
endpointKey{
Region: "us-gov-east-1",
Variant: fipsVariant,
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
}: endpoint{},
endpointKey{
Region: "us-gov-west-1",
Variant: fipsVariant,
}: endpoint{},
},
},
"managedblockchain": service{
Endpoints: serviceEndpoints{
endpointKey{

View file

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
const SDKVersion = "1.45.17"
const SDKVersion = "1.45.24"

View file

@ -1847,6 +1847,16 @@ func (c *EC2) AssociateNatGatewayAddressRequest(input *AssociateNatGatewayAddres
// more information, see Elastic IP address quotas (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-eips)
// in the Amazon VPC User Guide.
//
// When you associate an EIP or secondary EIPs with a public NAT gateway, the
// network border group of the EIPs must match the network border group of the
// Availability Zone (AZ) that the public NAT gateway is in. If it's not the
// same, the EIP will fail to associate. You can see the network border group
// for the subnet's AZ by viewing the details of the subnet. Similarly, you
// can view the network border group of an EIP by viewing the details of the
// EIP address. For more information about network border groups and EIPs, see
// Allocate an Elastic IP address (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip)
// in the Amazon VPC User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@ -7003,6 +7013,16 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques
// For more information, see NAT gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html)
// in the Amazon VPC User Guide.
//
// When you create a public NAT gateway and assign it an EIP or secondary EIPs,
// the network border group of the EIPs must match the network border group
// of the Availability Zone (AZ) that the public NAT gateway is in. If it's
// not the same, the NAT gateway will fail to launch. You can see the network
// border group for the subnet's AZ by viewing the details of the subnet. Similarly,
// you can view the network border group of an EIP by viewing the details of
// the EIP address. For more information about network border groups and EIPs,
// see Allocate an Elastic IP address (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip)
// in the Amazon VPC User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@ -16054,7 +16074,9 @@ func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, out
// that are associated with the VPC before you can delete it. For example, you
// must terminate all instances running in the VPC, delete all security groups
// associated with the VPC (except the default one), delete all route tables
// associated with the VPC (except the default one), and so on.
// associated with the VPC (except the default one), and so on. When you delete
// the VPC, it deletes the VPC's default security group, network ACL, and route
// table.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@ -26679,6 +26701,10 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI
//
// Describes one or more of your network interfaces.
//
// If you have a large number of network interfaces, the operation fails unless
// you use pagination or one of the following filters: group-id, mac-address,
// private-dns-name, private-ip-address, private-dns-name, subnet-id, or vpc-id.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@ -56512,9 +56538,6 @@ type AllocateAddressInput struct {
//
// Use DescribeAvailabilityZones (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html)
// to view the network border groups.
//
// You cannot use a network border group with EC2 Classic. If you attempt this
// operation on EC2 Classic, you receive an InvalidParameterCombination error.
NetworkBorderGroup *string `type:"string"`
// The ID of an address pool that you own. Use this parameter to let Amazon
@ -62826,7 +62849,8 @@ func (s CancelConversionTaskOutput) GoString() string {
type CancelExportTaskInput struct {
_ struct{} `type:"structure"`
// The ID of the export task. This is the ID returned by CreateInstanceExportTask.
// The ID of the export task. This is the ID returned by the CreateInstanceExportTask
// and ExportImage operations.
//
// ExportTaskId is a required field
ExportTaskId *string `locationName:"exportTaskId" type:"string" required:"true"`
@ -69316,7 +69340,7 @@ type CreateFleetInput struct {
SpotOptions *SpotOptionsRequest `type:"structure"`
// The key-value pair for tagging the EC2 Fleet request on creation. For more
// information, see Tagging your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources).
// information, see Tag your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources).
//
// If the fleet type is instant, specify a resource type of fleet to tag the
// fleet or instance to tag the instances at launch.
@ -77791,6 +77815,9 @@ type CreateVerifiedAccessEndpointInput struct {
// The IDs of the security groups to associate with the Verified Access endpoint.
SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The tags to assign to the Verified Access endpoint.
TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
@ -77928,6 +77955,12 @@ func (s *CreateVerifiedAccessEndpointInput) SetSecurityGroupIds(v []*string) *Cr
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *CreateVerifiedAccessEndpointInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessEndpointInput {
s.SseSpecification = v
return s
}
// SetTagSpecifications sets the TagSpecifications field's value.
func (s *CreateVerifiedAccessEndpointInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessEndpointInput {
s.TagSpecifications = v
@ -78064,6 +78097,9 @@ type CreateVerifiedAccessGroupInput struct {
// The Verified Access policy document.
PolicyDocument *string `type:"string"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The tags to assign to the Verified Access group.
TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
@ -78128,6 +78164,12 @@ func (s *CreateVerifiedAccessGroupInput) SetPolicyDocument(v string) *CreateVeri
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *CreateVerifiedAccessGroupInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessGroupInput {
s.SseSpecification = v
return s
}
// SetTagSpecifications sets the TagSpecifications field's value.
func (s *CreateVerifiedAccessGroupInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessGroupInput {
s.TagSpecifications = v
@ -78188,8 +78230,8 @@ type CreateVerifiedAccessInstanceInput struct {
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
// Choose to enable or disable support for Federal Information Processing Standards
// (FIPS) on the instance.
// Enable or disable support for Federal Information Processing Standards (FIPS)
// on the instance.
FIPSEnabled *bool `type:"boolean"`
// The tags to assign to the Verified Access instance.
@ -78342,6 +78384,9 @@ type CreateVerifiedAccessTrustProviderInput struct {
// PolicyReferenceName is a required field
PolicyReferenceName *string `type:"string" required:"true"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The tags to assign to the Verified Access trust provider.
TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
@ -78431,6 +78476,12 @@ func (s *CreateVerifiedAccessTrustProviderInput) SetPolicyReferenceName(v string
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *CreateVerifiedAccessTrustProviderInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessTrustProviderInput {
s.SseSpecification = v
return s
}
// SetTagSpecifications sets the TagSpecifications field's value.
func (s *CreateVerifiedAccessTrustProviderInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessTrustProviderInput {
s.TagSpecifications = v
@ -95720,8 +95771,6 @@ type DescribeInstancesInput struct {
// You can use a wildcard (*), for example, 2021-09-29T*, which matches an
// entire day.
//
// * license-pool -
//
// * maintenance-options.auto-recovery - The current automatic recovery behavior
// of the instance (disabled | default).
//
@ -95749,23 +95798,34 @@ type DescribeInstancesInput struct {
// * monitoring-state - Indicates whether detailed monitoring is enabled
// (disabled | enabled).
//
// * network-interface.addresses.primary - Specifies whether the IPv4 address
// of the network interface is the primary private IPv4 address.
// * network-interface.addresses.association.allocation-id - The allocation
// ID.
//
// * network-interface.addresses.private-ip-address - The private IPv4 address
// associated with the network interface.
// * network-interface.addresses.association.association-id - The association
// ID.
//
// * network-interface.addresses.association.public-ip - The ID of the association
// of an Elastic IP address (IPv4) with a network interface.
// * network-interface.addresses.association.carrier-ip - The carrier IP
// address.
//
// * network-interface.addresses.association.customer-owned-ip - The customer-owned
// IP address.
//
// * network-interface.addresses.association.ip-owner-id - The owner ID of
// the private IPv4 address associated with the network interface.
//
// * network-interface.association.public-ip - The address of the Elastic
// IP address (IPv4) bound to the network interface.
// * network-interface.addresses.association.public-dns-name - The public
// DNS name.
//
// * network-interface.association.ip-owner-id - The owner of the Elastic
// IP address (IPv4) associated with the network interface.
// * network-interface.addresses.association.public-ip - The ID of the association
// of an Elastic IP address (IPv4) with a network interface.
//
// * network-interface.addresses.primary - Specifies whether the IPv4 address
// of the network interface is the primary private IPv4 address.
//
// * network-interface.addresses.private-dns-name - The private DNS name.
//
// * network-interface.addresses.private-ip-address - The private IPv4 address
// associated with the network interface.
//
// * network-interface.association.allocation-id - The allocation ID returned
// when you allocated the Elastic IP address (IPv4) for your network interface.
@ -95773,30 +95833,50 @@ type DescribeInstancesInput struct {
// * network-interface.association.association-id - The association ID returned
// when the network interface was associated with an IPv4 address.
//
// * network-interface.association.carrier-ip - The customer-owned IP address.
//
// * network-interface.association.customer-owned-ip - The customer-owned
// IP address.
//
// * network-interface.association.ip-owner-id - The owner of the Elastic
// IP address (IPv4) associated with the network interface.
//
// * network-interface.association.public-dns-name - The public DNS name.
//
// * network-interface.association.public-ip - The address of the Elastic
// IP address (IPv4) bound to the network interface.
//
// * network-interface.attachment.attach-time - The time that the network
// interface was attached to an instance.
//
// * network-interface.attachment.attachment-id - The ID of the interface
// attachment.
//
// * network-interface.attachment.delete-on-termination - Specifies whether
// the attachment is deleted when an instance is terminated.
//
// * network-interface.attachment.device-index - The device index to which
// the network interface is attached.
//
// * network-interface.attachment.instance-id - The ID of the instance to
// which the network interface is attached.
//
// * network-interface.attachment.instance-owner-id - The owner ID of the
// instance to which the network interface is attached.
//
// * network-interface.attachment.device-index - The device index to which
// the network interface is attached.
// * network-interface.attachment.network-card-index - The index of the network
// card.
//
// * network-interface.attachment.status - The status of the attachment (attaching
// | attached | detaching | detached).
//
// * network-interface.attachment.attach-time - The time that the network
// interface was attached to an instance.
//
// * network-interface.attachment.delete-on-termination - Specifies whether
// the attachment is deleted when an instance is terminated.
//
// * network-interface.availability-zone - The Availability Zone for the
// network interface.
//
// * network-interface.deny-all-igw-traffic - A Boolean that indicates whether
// a network interface with an IPv6 address is unreachable from the public
// internet.
//
// * network-interface.description - The description of the network interface.
//
// * network-interface.group-id - The ID of a security group associated with
@ -95805,18 +95885,39 @@ type DescribeInstancesInput struct {
// * network-interface.group-name - The name of a security group associated
// with the network interface.
//
// * network-interface.ipv4-prefixes.ipv4-prefix - The IPv4 prefixes that
// are assigned to the network interface.
//
// * network-interface.ipv6-address - The IPv6 address associated with the
// network interface.
//
// * network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated
// with the network interface.
//
// * network-interface.ipv6-addresses.is-primary-ipv6 - A Boolean that indicates
// whether this is the primary IPv6 address.
//
// * network-interface.ipv6-native - A Boolean that indicates whether this
// is an IPv6 only network interface.
//
// * network-interface.ipv6-prefixes.ipv6-prefix - The IPv6 prefix assigned
// to the network interface.
//
// * network-interface.mac-address - The MAC address of the network interface.
//
// * network-interface.network-interface-id - The ID of the network interface.
//
// * network-interface.outpost-arn - The ARN of the Outpost.
//
// * network-interface.owner-id - The ID of the owner of the network interface.
//
// * network-interface.private-dns-name - The private DNS name of the network
// interface.
//
// * network-interface.private-ip-address - The private IPv4 address.
//
// * network-interface.public-dns-name - The public DNS name.
//
// * network-interface.requester-id - The requester ID for the network interface.
//
// * network-interface.requester-managed - Indicates whether the network
@ -95833,6 +95934,12 @@ type DescribeInstancesInput struct {
//
// * network-interface.subnet-id - The ID of the subnet for the network interface.
//
// * network-interface.tag-key - The key of a tag assigned to the network
// interface.
//
// * network-interface.tag-value - The value of a tag assigned to the network
// interface.
//
// * network-interface.vpc-id - The ID of the VPC for the network interface.
//
// * outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
@ -99762,23 +99869,23 @@ type DescribeNetworkInterfacesInput struct {
// One or more filters.
//
// * addresses.private-ip-address - The private IPv4 addresses associated
// with the network interface.
//
// * addresses.primary - Whether the private IPv4 address is the primary
// IP address associated with the network interface.
//
// * addresses.association.public-ip - The association ID returned when the
// network interface was associated with the Elastic IP address (IPv4).
//
// * addresses.association.owner-id - The owner ID of the addresses associated
// with the network interface.
// * association.allocation-id - The allocation ID returned when you allocated
// the Elastic IP address (IPv4) for your network interface.
//
// * association.association-id - The association ID returned when the network
// interface was associated with an IPv4 address.
//
// * association.allocation-id - The allocation ID returned when you allocated
// the Elastic IP address (IPv4) for your network interface.
// * addresses.association.owner-id - The owner ID of the addresses associated
// with the network interface.
//
// * addresses.association.public-ip - The association ID returned when the
// network interface was associated with the Elastic IP address (IPv4).
//
// * addresses.primary - Whether the private IPv4 address is the primary
// IP address associated with the network interface.
//
// * addresses.private-ip-address - The private IPv4 addresses associated
// with the network interface.
//
// * association.ip-owner-id - The owner of the Elastic IP address (IPv4)
// associated with the network interface.
@ -99789,11 +99896,11 @@ type DescribeNetworkInterfacesInput struct {
// * association.public-dns-name - The public DNS name for the network interface
// (IPv4).
//
// * attachment.attachment-id - The ID of the interface attachment.
//
// * attachment.attach-time - The time that the network interface was attached
// to an instance.
//
// * attachment.attachment-id - The ID of the interface attachment.
//
// * attachment.delete-on-termination - Indicates whether the attachment
// is deleted when an instance is terminated.
//
@ -99815,17 +99922,15 @@ type DescribeNetworkInterfacesInput struct {
//
// * group-id - The ID of a security group associated with the network interface.
//
// * group-name - The name of a security group associated with the network
// interface.
//
// * ipv6-addresses.ipv6-address - An IPv6 address associated with the network
// interface.
//
// * interface-type - The type of network interface (api_gateway_managed
// | aws_codestar_connections_managed | branch | efa | gateway_load_balancer
// | gateway_load_balancer_endpoint | global_accelerator_managed | interface
// | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer
// | quicksight | transit_gateway | trunk | vpc_endpoint).
// | aws_codestar_connections_managed | branch | ec2_instance_connect_endpoint
// | efa | efs | gateway_load_balancer | gateway_load_balancer_endpoint |
// global_accelerator_managed | interface | iot_rules_managed | lambda |
// load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway
// | trunk | vpc_endpoint).
//
// * mac-address - The MAC address of the network interface.
//
@ -99834,11 +99939,11 @@ type DescribeNetworkInterfacesInput struct {
// * owner-id - The Amazon Web Services account ID of the network interface
// owner.
//
// * private-dns-name - The private DNS name of the network interface (IPv4).
//
// * private-ip-address - The private IPv4 address or addresses of the network
// interface.
//
// * private-dns-name - The private DNS name of the network interface (IPv4).
//
// * requester-id - The alias or Amazon Web Services account ID of the principal
// or service that created the network interface.
//
@ -127531,6 +127636,10 @@ type ImportImageInput struct {
Architecture *string `type:"string"`
// The boot mode of the virtual machine.
//
// The uefi-preferred boot mode isn't supported for importing images. For more
// information, see Boot modes (https://docs.aws.amazon.com/vm-import/latest/userguide/prerequisites.html#vmimport-boot-modes)
// in the VM Import/Export User Guide.
BootMode *string `type:"string" enum:"BootModeValues"`
// The client-specific data.
@ -139245,9 +139354,12 @@ type LaunchTemplateTagSpecificationRequest struct {
// The type of resource to tag.
//
// The Valid Values are all the resource types that can be tagged. However,
// when creating a launch template, you can specify tags for the following resource
// types only: instance | volume | elastic-gpu | network-interface | spot-instances-request
// Valid Values lists all resource types for Amazon EC2 that can be tagged.
// When you create a launch template, you can specify tags for the following
// resource types only: instance | volume | elastic-gpu | network-interface
// | spot-instances-request. If the instance does include the resource type
// that you specify, the instance launch fails. For example, not all instance
// types include an Elastic GPU.
//
// To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html).
ResourceType *string `type:"string" enum:"ResourceType"`
@ -147395,9 +147507,10 @@ type ModifyVerifiedAccessEndpointPolicyInput struct {
PolicyDocument *string `type:"string"`
// The status of the Verified Access policy.
//
// PolicyEnabled is a required field
PolicyEnabled *bool `type:"boolean" required:"true"`
PolicyEnabled *bool `type:"boolean"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The ID of the Verified Access endpoint.
//
@ -147426,9 +147539,6 @@ func (s ModifyVerifiedAccessEndpointPolicyInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyVerifiedAccessEndpointPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyVerifiedAccessEndpointPolicyInput"}
if s.PolicyEnabled == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyEnabled"))
}
if s.VerifiedAccessEndpointId == nil {
invalidParams.Add(request.NewErrParamRequired("VerifiedAccessEndpointId"))
}
@ -147463,6 +147573,12 @@ func (s *ModifyVerifiedAccessEndpointPolicyInput) SetPolicyEnabled(v bool) *Modi
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *ModifyVerifiedAccessEndpointPolicyInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessEndpointPolicyInput {
s.SseSpecification = v
return s
}
// SetVerifiedAccessEndpointId sets the VerifiedAccessEndpointId field's value.
func (s *ModifyVerifiedAccessEndpointPolicyInput) SetVerifiedAccessEndpointId(v string) *ModifyVerifiedAccessEndpointPolicyInput {
s.VerifiedAccessEndpointId = &v
@ -147477,6 +147593,9 @@ type ModifyVerifiedAccessEndpointPolicyOutput struct {
// The status of the Verified Access policy.
PolicyEnabled *bool `locationName:"policyEnabled" type:"boolean"`
// Describes the options in use for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"`
}
// String returns the string representation.
@ -147509,6 +147628,12 @@ func (s *ModifyVerifiedAccessEndpointPolicyOutput) SetPolicyEnabled(v bool) *Mod
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *ModifyVerifiedAccessEndpointPolicyOutput) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *ModifyVerifiedAccessEndpointPolicyOutput {
s.SseSpecification = v
return s
}
type ModifyVerifiedAccessGroupInput struct {
_ struct{} `type:"structure"`
@ -147645,9 +147770,10 @@ type ModifyVerifiedAccessGroupPolicyInput struct {
PolicyDocument *string `type:"string"`
// The status of the Verified Access policy.
//
// PolicyEnabled is a required field
PolicyEnabled *bool `type:"boolean" required:"true"`
PolicyEnabled *bool `type:"boolean"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The ID of the Verified Access group.
//
@ -147676,9 +147802,6 @@ func (s ModifyVerifiedAccessGroupPolicyInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *ModifyVerifiedAccessGroupPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ModifyVerifiedAccessGroupPolicyInput"}
if s.PolicyEnabled == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyEnabled"))
}
if s.VerifiedAccessGroupId == nil {
invalidParams.Add(request.NewErrParamRequired("VerifiedAccessGroupId"))
}
@ -147713,6 +147836,12 @@ func (s *ModifyVerifiedAccessGroupPolicyInput) SetPolicyEnabled(v bool) *ModifyV
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *ModifyVerifiedAccessGroupPolicyInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessGroupPolicyInput {
s.SseSpecification = v
return s
}
// SetVerifiedAccessGroupId sets the VerifiedAccessGroupId field's value.
func (s *ModifyVerifiedAccessGroupPolicyInput) SetVerifiedAccessGroupId(v string) *ModifyVerifiedAccessGroupPolicyInput {
s.VerifiedAccessGroupId = &v
@ -147727,6 +147856,9 @@ type ModifyVerifiedAccessGroupPolicyOutput struct {
// The status of the Verified Access policy.
PolicyEnabled *bool `locationName:"policyEnabled" type:"boolean"`
// Describes the options in use for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"`
}
// String returns the string representation.
@ -147759,6 +147891,12 @@ func (s *ModifyVerifiedAccessGroupPolicyOutput) SetPolicyEnabled(v bool) *Modify
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *ModifyVerifiedAccessGroupPolicyOutput) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *ModifyVerifiedAccessGroupPolicyOutput {
s.SseSpecification = v
return s
}
type ModifyVerifiedAccessInstanceInput struct {
_ struct{} `type:"structure"`
@ -148007,6 +148145,9 @@ type ModifyVerifiedAccessTrustProviderInput struct {
// The options for an OpenID Connect-compatible user-identity trust provider.
OidcOptions *ModifyVerifiedAccessTrustProviderOidcOptions `type:"structure"`
// Options for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"`
// The ID of the Verified Access trust provider.
//
// VerifiedAccessTrustProviderId is a required field
@ -148068,6 +148209,12 @@ func (s *ModifyVerifiedAccessTrustProviderInput) SetOidcOptions(v *ModifyVerifie
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *ModifyVerifiedAccessTrustProviderInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessTrustProviderInput {
s.SseSpecification = v
return s
}
// SetVerifiedAccessTrustProviderId sets the VerifiedAccessTrustProviderId field's value.
func (s *ModifyVerifiedAccessTrustProviderInput) SetVerifiedAccessTrustProviderId(v string) *ModifyVerifiedAccessTrustProviderInput {
s.VerifiedAccessTrustProviderId = &v
@ -153027,6 +153174,14 @@ type OnDemandOptions struct {
// The maximum amount per hour for On-Demand Instances that you're willing to
// pay.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The maxTotalPrice does not account for surplus
// credits, and, if you use surplus credits, your final cost might be higher
// than what you specified for maxTotalPrice. For more information, see Surplus
// credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
MaxTotalPrice *string `locationName:"maxTotalPrice" type:"string"`
// The minimum target capacity for On-Demand Instances in the fleet. If the
@ -153129,6 +153284,14 @@ type OnDemandOptionsRequest struct {
// The maximum amount per hour for On-Demand Instances that you're willing to
// pay.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The MaxTotalPrice does not account for surplus
// credits, and, if you use surplus credits, your final cost might be higher
// than what you specified for MaxTotalPrice. For more information, see Surplus
// credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
MaxTotalPrice *string `type:"string"`
// The minimum target capacity for On-Demand Instances in the fleet. If the
@ -158227,9 +158390,6 @@ type ReleaseAddressInput struct {
//
// If you provide an incorrect network border group, you receive an InvalidAddress.NotFound
// error.
//
// You cannot use a network border group with EC2 Classic. If you attempt this
// operation on EC2 classic, you receive an InvalidParameterCombination error.
NetworkBorderGroup *string `type:"string"`
// Deprecated.
@ -159937,7 +160097,19 @@ type RequestLaunchTemplateData struct {
// An elastic GPU to associate with the instance.
ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"`
// The elastic inference accelerator for the instance.
// An elastic inference accelerator to associate with the instance. Elastic
// inference accelerators are a resource you can attach to your Amazon EC2 instances
// to accelerate your Deep Learning (DL) inference workloads.
//
// You cannot specify accelerators from different generations in the same request.
//
// Starting April 15, 2023, Amazon Web Services will not onboard new customers
// to Amazon Elastic Inference (EI), and will help current customers migrate
// their workloads to options that offer better price and performance. After
// April 15, 2023, new customers will not be able to launch instances with Amazon
// EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However,
// customers who have used Amazon EI at least once during the past 30-day period
// are considered current customers and will be able to continue using the service.
ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"`
// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
@ -162753,7 +162925,19 @@ type ResponseLaunchTemplateData struct {
// The elastic GPU specification.
ElasticGpuSpecifications []*ElasticGpuSpecificationResponse `locationName:"elasticGpuSpecificationSet" locationNameList:"item" type:"list"`
// The elastic inference accelerator for the instance.
// An elastic inference accelerator to associate with the instance. Elastic
// inference accelerators are a resource you can attach to your Amazon EC2 instances
// to accelerate your Deep Learning (DL) inference workloads.
//
// You cannot specify accelerators from different generations in the same request.
//
// Starting April 15, 2023, Amazon Web Services will not onboard new customers
// to Amazon Elastic Inference (EI), and will help current customers migrate
// their workloads to options that offer better price and performance. After
// April 15, 2023, new customers will not be able to launch instances with Amazon
// EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However,
// customers who have used Amazon EI at least once during the past 30-day period
// are considered current customers and will be able to continue using the service.
ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAcceleratorResponse `locationName:"elasticInferenceAcceleratorSet" locationNameList:"item" type:"list"`
// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
@ -169721,6 +169905,14 @@ type SpotFleetRequestConfigData struct {
// it reaches the maximum amount you're willing to pay. When the maximum amount
// you're willing to pay is reached, the fleet stops launching instances even
// if it hasnt met the target capacity.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The onDemandMaxTotalPrice does not account
// for surplus credits, and, if you use surplus credits, your final cost might
// be higher than what you specified for onDemandMaxTotalPrice. For more information,
// see Surplus credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
OnDemandMaxTotalPrice *string `locationName:"onDemandMaxTotalPrice" type:"string"`
// The number of On-Demand units to request. You can choose to set the target
@ -169738,13 +169930,21 @@ type SpotFleetRequestConfigData struct {
SpotMaintenanceStrategies *SpotMaintenanceStrategies `locationName:"spotMaintenanceStrategies" type:"structure"`
// The maximum amount per hour for Spot Instances that you're willing to pay.
// You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter,
// You can use the spotMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter,
// or both parameters to ensure that your fleet cost does not exceed your budget.
// If you set a maximum price per hour for the On-Demand Instances and Spot
// Instances in your request, Spot Fleet will launch instances until it reaches
// the maximum amount you're willing to pay. When the maximum amount you're
// willing to pay is reached, the fleet stops launching instances even if it
// hasnt met the target capacity.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The spotMaxTotalPrice does not account for
// surplus credits, and, if you use surplus credits, your final cost might be
// higher than what you specified for spotMaxTotalPrice. For more information,
// see Surplus credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
SpotMaxTotalPrice *string `locationName:"spotMaxTotalPrice" type:"string"`
// The maximum price per unit hour that you are willing to pay for a Spot Instance.
@ -169763,7 +169963,7 @@ type SpotFleetRequestConfigData struct {
// (valid only if you use LaunchTemplateConfigs) or in the SpotFleetTagSpecification
// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html)
// (valid only if you use LaunchSpecifications). For information about tagging
// after launch, see Tagging Your Resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources).
// after launch, see Tag your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources).
TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"`
// The number of units to request for the Spot Fleet. You can choose to set
@ -170568,6 +170768,14 @@ type SpotOptions struct {
//
// If you specify a maximum price, your Spot Instances will be interrupted more
// frequently than if you do not specify this parameter.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The maxTotalPrice does not account for surplus
// credits, and, if you use surplus credits, your final cost might be higher
// than what you specified for maxTotalPrice. For more information, see Surplus
// credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
MaxTotalPrice *string `locationName:"maxTotalPrice" type:"string"`
// The minimum target capacity for Spot Instances in the fleet. If the minimum
@ -170740,6 +170948,14 @@ type SpotOptionsRequest struct {
//
// If you specify a maximum price, your Spot Instances will be interrupted more
// frequently than if you do not specify this parameter.
//
// If your fleet includes T instances that are configured as unlimited, and
// if their average CPU usage exceeds the baseline utilization, you will incur
// a charge for surplus credits. The MaxTotalPrice does not account for surplus
// credits, and, if you use surplus credits, your final cost might be higher
// than what you specified for MaxTotalPrice. For more information, see Surplus
// credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits)
// in the EC2 User Guide.
MaxTotalPrice *string `type:"string"`
// The minimum target capacity for Spot Instances in the fleet. If the minimum
@ -178690,6 +178906,9 @@ type VerifiedAccessEndpoint struct {
// The IDs of the security groups for the endpoint.
SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"`
// Describes the options in use for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"`
// The endpoint status.
Status *VerifiedAccessEndpointStatus `locationName:"status" type:"structure"`
@ -178802,6 +179021,12 @@ func (s *VerifiedAccessEndpoint) SetSecurityGroupIds(v []*string) *VerifiedAcces
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *VerifiedAccessEndpoint) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessEndpoint {
s.SseSpecification = v
return s
}
// SetStatus sets the Status field's value.
func (s *VerifiedAccessEndpoint) SetStatus(v *VerifiedAccessEndpointStatus) *VerifiedAccessEndpoint {
s.Status = v
@ -179002,6 +179227,9 @@ type VerifiedAccessGroup struct {
// The Amazon Web Services account number that owns the group.
Owner *string `locationName:"owner" type:"string"`
// Describes the options in use for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"`
// The tags.
Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
@ -179063,6 +179291,12 @@ func (s *VerifiedAccessGroup) SetOwner(v string) *VerifiedAccessGroup {
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *VerifiedAccessGroup) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessGroup {
s.SseSpecification = v
return s
}
// SetTags sets the Tags field's value.
func (s *VerifiedAccessGroup) SetTags(v []*Tag) *VerifiedAccessGroup {
s.Tags = v
@ -179097,7 +179331,7 @@ type VerifiedAccessInstance struct {
// A description for the Amazon Web Services Verified Access instance.
Description *string `locationName:"description" type:"string"`
// Describes if support for Federal Information Processing Standards (FIPS)
// Describes whether support for Federal Information Processing Standards (FIPS)
// is enabled on the instance.
FipsEnabled *bool `locationName:"fipsEnabled" type:"boolean"`
@ -179773,6 +180007,94 @@ func (s *VerifiedAccessLogs) SetS3(v *VerifiedAccessLogS3Destination) *VerifiedA
return s
}
// Verified Access provides server side encryption by default to data at rest
// using Amazon Web Services-owned KMS keys. You also have the option of using
// customer managed KMS keys, which can be specified using the options below.
type VerifiedAccessSseSpecificationRequest struct {
_ struct{} `type:"structure"`
// Enable or disable the use of customer managed KMS keys for server side encryption.
//
// Valid values: True | False
CustomerManagedKeyEnabled *bool `type:"boolean"`
// The ARN of the KMS key.
KmsKeyArn *string `type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s VerifiedAccessSseSpecificationRequest) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s VerifiedAccessSseSpecificationRequest) GoString() string {
return s.String()
}
// SetCustomerManagedKeyEnabled sets the CustomerManagedKeyEnabled field's value.
func (s *VerifiedAccessSseSpecificationRequest) SetCustomerManagedKeyEnabled(v bool) *VerifiedAccessSseSpecificationRequest {
s.CustomerManagedKeyEnabled = &v
return s
}
// SetKmsKeyArn sets the KmsKeyArn field's value.
func (s *VerifiedAccessSseSpecificationRequest) SetKmsKeyArn(v string) *VerifiedAccessSseSpecificationRequest {
s.KmsKeyArn = &v
return s
}
// Describes the options in use for server side encryption.
type VerifiedAccessSseSpecificationResponse struct {
_ struct{} `type:"structure"`
// Describes the use of customer managed KMS keys for server side encryption.
//
// Valid values: True | False
CustomerManagedKeyEnabled *bool `locationName:"customerManagedKeyEnabled" type:"boolean"`
// Describes the ARN of the KMS key.
KmsKeyArn *string `locationName:"kmsKeyArn" type:"string"`
}
// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s VerifiedAccessSseSpecificationResponse) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s VerifiedAccessSseSpecificationResponse) GoString() string {
return s.String()
}
// SetCustomerManagedKeyEnabled sets the CustomerManagedKeyEnabled field's value.
func (s *VerifiedAccessSseSpecificationResponse) SetCustomerManagedKeyEnabled(v bool) *VerifiedAccessSseSpecificationResponse {
s.CustomerManagedKeyEnabled = &v
return s
}
// SetKmsKeyArn sets the KmsKeyArn field's value.
func (s *VerifiedAccessSseSpecificationResponse) SetKmsKeyArn(v string) *VerifiedAccessSseSpecificationResponse {
s.KmsKeyArn = &v
return s
}
// Describes a Verified Access trust provider.
type VerifiedAccessTrustProvider struct {
_ struct{} `type:"structure"`
@ -179798,6 +180120,9 @@ type VerifiedAccessTrustProvider struct {
// The identifier to be used when working with policy rules.
PolicyReferenceName *string `locationName:"policyReferenceName" type:"string"`
// Describes the options in use for server side encryption.
SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"`
// The tags.
Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
@ -179871,6 +180196,12 @@ func (s *VerifiedAccessTrustProvider) SetPolicyReferenceName(v string) *Verified
return s
}
// SetSseSpecification sets the SseSpecification field's value.
func (s *VerifiedAccessTrustProvider) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessTrustProvider {
s.SseSpecification = v
return s
}
// SetTags sets the Tags field's value.
func (s *VerifiedAccessTrustProvider) SetTags(v []*Tag) *VerifiedAccessTrustProvider {
s.Tags = v
@ -187952,6 +188283,30 @@ const (
// InstanceTypeMac2M2proMetal is a InstanceType enum value
InstanceTypeMac2M2proMetal = "mac2-m2pro.metal"
// InstanceTypeR7izLarge is a InstanceType enum value
InstanceTypeR7izLarge = "r7iz.large"
// InstanceTypeR7izXlarge is a InstanceType enum value
InstanceTypeR7izXlarge = "r7iz.xlarge"
// InstanceTypeR7iz2xlarge is a InstanceType enum value
InstanceTypeR7iz2xlarge = "r7iz.2xlarge"
// InstanceTypeR7iz4xlarge is a InstanceType enum value
InstanceTypeR7iz4xlarge = "r7iz.4xlarge"
// InstanceTypeR7iz8xlarge is a InstanceType enum value
InstanceTypeR7iz8xlarge = "r7iz.8xlarge"
// InstanceTypeR7iz12xlarge is a InstanceType enum value
InstanceTypeR7iz12xlarge = "r7iz.12xlarge"
// InstanceTypeR7iz16xlarge is a InstanceType enum value
InstanceTypeR7iz16xlarge = "r7iz.16xlarge"
// InstanceTypeR7iz32xlarge is a InstanceType enum value
InstanceTypeR7iz32xlarge = "r7iz.32xlarge"
)
// InstanceType_Values returns all elements of the InstanceType enum
@ -188698,6 +189053,14 @@ func InstanceType_Values() []string {
InstanceTypeC7i24xlarge,
InstanceTypeC7i48xlarge,
InstanceTypeMac2M2proMetal,
InstanceTypeR7izLarge,
InstanceTypeR7izXlarge,
InstanceTypeR7iz2xlarge,
InstanceTypeR7iz4xlarge,
InstanceTypeR7iz8xlarge,
InstanceTypeR7iz12xlarge,
InstanceTypeR7iz16xlarge,
InstanceTypeR7iz32xlarge,
}
}

View file

@ -5,9 +5,18 @@ type Azure struct {
}
func (p *Azure) GetPackages() []string {
return []string{"WALinuxAgent"}
return []string{
"cloud-init",
"WALinuxAgent",
}
}
func (p *Azure) GetServices() []string {
return []string{"waagent"}
return []string{
"cloud-init.service",
"cloud-config.service",
"cloud-final.service",
"cloud-init-local.service",
"waagent",
}
}

View file

@ -9,5 +9,10 @@ func (p *EC2) GetPackages() []string {
}
func (p *EC2) GetServices() []string {
return []string{"cloud-init.service"}
return []string{
"cloud-init.service",
"cloud-config.service",
"cloud-final.service",
"cloud-init-local.service",
}
}

View file

@ -0,0 +1,21 @@
package environment
type KVM struct {
BaseEnvironment
}
func (e *KVM) GetPackages() []string {
return []string{
"cloud-init",
"qemu-guest-agent",
}
}
func (e *KVM) GetServices() []string {
return []string{
"cloud-init.service",
"cloud-config.service",
"cloud-final.service",
"cloud-init-local.service",
}
}

View file

@ -12,14 +12,9 @@ type Blueprint struct {
Containers []Container `json:"containers,omitempty" toml:"containers,omitempty"`
Customizations *Customizations `json:"customizations,omitempty" toml:"customizations"`
Distro string `json:"distro" toml:"distro"`
}
type Change struct {
Commit string `json:"commit" toml:"commit"`
Message string `json:"message" toml:"message"`
Revision *int `json:"revision" toml:"revision"`
Timestamp string `json:"timestamp" toml:"timestamp"`
Blueprint Blueprint `json:"-" toml:"-"`
// EXPERIMENTAL
Minimal bool `json:"minimal" toml:"minimal"`
}
// A Package specifies an RPM package.

View file

@ -233,20 +233,15 @@ var (
}
qcow2ImgType = imageType{
name: "qcow2",
filename: "disk.qcow2",
mimeType: "application/x-qemu-disk",
name: "qcow2",
filename: "disk.qcow2",
mimeType: "application/x-qemu-disk",
environment: &environment.KVM{},
packageSets: map[string]packageSetFunc{
osPkgsKey: qcow2CommonPackageSet,
},
defaultImageConfig: &distro.ImageConfig{
DefaultTarget: common.ToPtr("multi-user.target"),
EnabledServices: []string{
"cloud-init.service",
"cloud-config.service",
"cloud-final.service",
"cloud-init-local.service",
},
},
kernelOptions: cloudKernelOptions,
bootable: true,

View file

@ -235,7 +235,7 @@ func osCustomizations(
func diskImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -243,12 +243,16 @@ func diskImage(workload workload.Workload,
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
img.Environment = t.environment
img.Workload = workload
img.Compression = t.compression
if bp.Minimal {
// Disable weak dependencies if the 'minimal' option is enabled
img.InstallWeakDeps = common.ToPtr(false)
}
// TODO: move generation into LiveImage
pt, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
pt, err := t.getPartitionTable(bp.Customizations.GetFilesystems(), options, rng)
if err != nil {
return nil, err
}
@ -261,7 +265,7 @@ func diskImage(workload workload.Workload,
func containerImage(workload workload.Workload,
t *imageType,
c *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -269,7 +273,7 @@ func containerImage(workload workload.Workload,
img := image.NewBaseContainer()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, c)
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
img.Environment = t.environment
img.Workload = workload
@ -280,7 +284,7 @@ func containerImage(workload workload.Workload,
func liveInstallerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -307,7 +311,7 @@ func liveInstallerImage(workload workload.Workload,
func imageInstallerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -327,6 +331,7 @@ func imageInstallerImage(workload workload.Workload,
}
img.AdditionalAnacondaModules = append(img.AdditionalAnacondaModules, "org.fedoraproject.Anaconda.Modules.Users")
customizations := bp.Customizations
img.Platform = t.platform
img.Workload = workload
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
@ -351,7 +356,7 @@ func imageInstallerImage(workload workload.Workload,
func iotCommitImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -363,7 +368,7 @@ func iotCommitImage(workload workload.Workload,
d := t.arch.distro
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
if !common.VersionLessThan(d.Releasever(), "38") {
// see https://github.com/ostreedev/ostree/issues/2840
img.OSCustomizations.Presets = []osbuild.Preset{
@ -393,7 +398,7 @@ func iotCommitImage(workload workload.Workload,
func iotContainerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -403,7 +408,7 @@ func iotContainerImage(workload workload.Workload,
img := image.NewOSTreeContainer(commitRef)
d := t.arch.distro
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
if !common.VersionLessThan(d.Releasever(), "38") {
// see https://github.com/ostreedev/ostree/issues/2840
img.OSCustomizations.Presets = []osbuild.Preset{
@ -434,7 +439,7 @@ func iotContainerImage(workload workload.Workload,
func iotInstallerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -449,6 +454,7 @@ func iotInstallerImage(workload workload.Workload,
img := image.NewAnacondaOSTreeInstaller(commit)
customizations := bp.Customizations
img.Platform = t.platform
img.ExtraBasePackages = packageSets[installerPkgsKey]
img.Users = users.UsersFromBP(customizations.GetUsers())
@ -475,7 +481,7 @@ func iotInstallerImage(workload workload.Workload,
func iotImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -489,6 +495,7 @@ func iotImage(workload workload.Workload,
distro := t.Arch().Distro()
customizations := bp.Customizations
img.Users = users.UsersFromBP(customizations.GetUsers())
img.Groups = users.GroupsFromBP(customizations.GetGroups())
@ -551,7 +558,7 @@ func iotImage(workload workload.Workload,
func iotSimplifiedInstallerImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
bp *blueprint.Blueprint,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
@ -563,6 +570,7 @@ func iotSimplifiedInstallerImage(workload workload.Workload,
}
rawImg := image.NewOSTreeDiskImage(commit)
customizations := bp.Customizations
rawImg.Users = users.UsersFromBP(customizations.GetUsers())
rawImg.Groups = users.GroupsFromBP(customizations.GetGroups())

View file

@ -21,7 +21,7 @@ import (
"golang.org/x/exp/slices"
)
type imageFunc func(workload workload.Workload, t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
type imageFunc func(workload workload.Workload, t *imageType, bp *blueprint.Blueprint, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
type packageSetFunc func(t *imageType) rpmmd.PackageSet
@ -174,8 +174,11 @@ func (t *imageType) Manifest(bp *blueprint.Blueprint,
// of the same name from the distro and arch
staticPackageSets := make(map[string]rpmmd.PackageSet)
for name, getter := range t.packageSets {
staticPackageSets[name] = getter(t)
// don't add any static packages if Minimal was selected
if !bp.Minimal {
for name, getter := range t.packageSets {
staticPackageSets[name] = getter(t)
}
}
// amend with repository information and collect payload repos
@ -219,7 +222,7 @@ func (t *imageType) Manifest(bp *blueprint.Blueprint,
/* #nosec G404 */
rng := rand.New(source)
img, err := t.image(w, t, bp.Customizations, options, staticPackageSets, containerSources, rng)
img, err := t.image(w, t, bp, options, staticPackageSets, containerSources, rng)
if err != nil {
return nil, nil, err
}

View file

@ -434,6 +434,7 @@ func liveInstallerPackageSet(t *imageType) rpmmd.PackageSet {
"fcoe-utils",
"gfs2-utils",
"reiserfs-utils",
"sdubby",
},
}

View file

@ -176,217 +176,229 @@ func azureRhuiPackageSet(t *imageType) rpmmd.PackageSet {
// PARTITION TABLES
var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{
platform.ARCH_X86_64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Size: 64 * common.GibiByte,
Partitions: []disk.Partition{
{
Size: 500 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
func azureRhuiBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
bootSize := uint64(600) * common.MebiByte
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
bootSize = 500 * common.MebiByte
}
switch t.platform.GetArch() {
case platform.ARCH_X86_64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Size: 64 * common.GibiByte,
Partitions: []disk.Partition{
{
Size: 500 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
},
{
Size: 500 * common.MebiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: bootSize,
Type: disk.FilesystemDataGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.MebiByte,
Bootable: true,
Type: disk.BIOSBootPartitionGUID,
UUID: disk.BIOSBootPartitionUUID,
},
{
Type: disk.LVMPartitionGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.LVMVolumeGroup{
Name: "rootvg",
Description: "built with lvm2 and osbuild",
LogicalVolumes: []disk.LVMLogicalVolume{
{
Size: 1 * common.GibiByte,
Name: "homelv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "home",
Mountpoint: "/home",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 2 * common.MebiByte,
Bootable: true,
Type: disk.BIOSBootPartitionGUID,
UUID: disk.BIOSBootPartitionUUID,
},
{
Type: disk.LVMPartitionGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.LVMVolumeGroup{
Name: "rootvg",
Description: "built with lvm2 and osbuild",
LogicalVolumes: []disk.LVMLogicalVolume{
{
Size: 1 * common.GibiByte,
Name: "homelv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "home",
Mountpoint: "/home",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.GibiByte,
Name: "rootlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 2 * common.GibiByte,
Name: "rootlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.GibiByte,
Name: "tmplv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "tmp",
Mountpoint: "/tmp",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 2 * common.GibiByte,
Name: "tmplv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "tmp",
Mountpoint: "/tmp",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 10 * common.GibiByte,
Name: "usrlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "usr",
Mountpoint: "/usr",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 10 * common.GibiByte,
Name: "usrlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "usr",
Mountpoint: "/usr",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 10 * common.GibiByte,
Name: "varlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "var",
Mountpoint: "/var",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 10 * common.GibiByte,
Name: "varlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "var",
Mountpoint: "/var",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
},
},
},
},
platform.ARCH_AARCH64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Size: 64 * common.GibiByte,
Partitions: []disk.Partition{
{
Size: 500 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
}, true
case platform.ARCH_AARCH64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Size: 64 * common.GibiByte,
Partitions: []disk.Partition{
{
Size: 500 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
},
{
Size: 500 * common.MebiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: bootSize,
Type: disk.FilesystemDataGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Type: disk.LVMPartitionGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.LVMVolumeGroup{
Name: "rootvg",
Description: "built with lvm2 and osbuild",
LogicalVolumes: []disk.LVMLogicalVolume{
{
Size: 1 * common.GibiByte,
Name: "homelv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "home",
Mountpoint: "/home",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Type: disk.LVMPartitionGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.LVMVolumeGroup{
Name: "rootvg",
Description: "built with lvm2 and osbuild",
LogicalVolumes: []disk.LVMLogicalVolume{
{
Size: 1 * common.GibiByte,
Name: "homelv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "home",
Mountpoint: "/home",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.GibiByte,
Name: "rootlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 2 * common.GibiByte,
Name: "rootlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.GibiByte,
Name: "tmplv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "tmp",
Mountpoint: "/tmp",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 2 * common.GibiByte,
Name: "tmplv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "tmp",
Mountpoint: "/tmp",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 10 * common.GibiByte,
Name: "usrlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "usr",
Mountpoint: "/usr",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 10 * common.GibiByte,
Name: "usrlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "usr",
Mountpoint: "/usr",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 10 * common.GibiByte,
Name: "varlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "var",
Mountpoint: "/var",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
{
Size: 10 * common.GibiByte,
Name: "varlv",
Payload: &disk.Filesystem{
Type: "xfs",
Label: "var",
Mountpoint: "/var",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
},
},
},
},
}, true
default:
return disk.PartitionTable{}, false
}
}
var defaultAzureKernelOptions = "ro console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"

View file

@ -223,105 +223,122 @@ var (
},
},
}
// Partition tables
minimalrawPartitionTables = distro.BasePartitionTableMap{
platform.ARCH_X86_64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
StartOffset: 8 * common.MebiByte,
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: 500 * common.MebiByte,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
platform.ARCH_AARCH64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
StartOffset: 8 * common.MebiByte,
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: 500 * common.MebiByte,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
)
// Partition tables
func minimalrawPartitionTables(t *imageType) (disk.PartitionTable, bool) {
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
bootSize := uint64(600) * common.MebiByte
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
bootSize = 500 * common.MebiByte
}
edgeBasePartitionTables = distro.BasePartitionTableMap{
platform.ARCH_X86_64.String(): disk.PartitionTable{
switch t.platform.GetArch() {
case platform.ARCH_X86_64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
StartOffset: 8 * common.MebiByte,
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: bootSize,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
}, true
case platform.ARCH_AARCH64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
StartOffset: 8 * common.MebiByte,
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: bootSize,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
}, true
default:
return disk.PartitionTable{}, false
}
}
func edgeBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
switch t.platform.GetArch() {
case platform.ARCH_X86_64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
@ -396,8 +413,9 @@ var (
},
},
},
},
platform.ARCH_AARCH64.String(): disk.PartitionTable{
}, true
case platform.ARCH_AARCH64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
@ -466,9 +484,12 @@ var (
},
},
},
},
}, true
default:
return disk.PartitionTable{}, false
}
)
}
// Package Sets

View file

@ -46,6 +46,8 @@ type imageFunc func(workload workload.Workload, t *imageType, customizations *bl
type packageSetFunc func(t *imageType) rpmmd.PackageSet
type basePartitionTableFunc func(t *imageType) (disk.PartitionTable, bool)
type imageType struct {
arch *architecture
platform platform.Platform
@ -72,7 +74,7 @@ type imageType struct {
// bootable image
bootable bool
// List of valid arches for the image type
basePartitionTables distro.BasePartitionTableMap
basePartitionTables basePartitionTableFunc
}
func (t *imageType) Name() string {
@ -151,7 +153,7 @@ func (t *imageType) getPartitionTable(
) (*disk.PartitionTable, error) {
archName := t.arch.Name()
basePartitionTable, exists := t.basePartitionTables[archName]
basePartitionTable, exists := t.basePartitionTables(t)
if !exists {
return nil, fmt.Errorf("no partition table defined for architecture %q for image type %q", archName, t.Name())
@ -175,8 +177,7 @@ func (t *imageType) getDefaultImageConfig() *distro.ImageConfig {
}
func (t *imageType) PartitionType() string {
archName := t.arch.Name()
basePartitionTable, exists := t.basePartitionTables[archName]
basePartitionTable, exists := t.basePartitionTables(t)
if !exists {
return ""
}

View file

@ -3,167 +3,182 @@ package rhel9
import (
"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/disk"
"github.com/osbuild/images/pkg/distro"
"github.com/osbuild/images/pkg/platform"
)
var defaultBasePartitionTables = distro.BasePartitionTableMap{
platform.ARCH_X86_64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
{
Size: 1 * common.MebiByte,
Bootable: true,
Type: disk.BIOSBootPartitionGUID,
UUID: disk.BIOSBootPartitionUUID,
},
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
bootSize := uint64(600) * common.MebiByte
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
bootSize = 500 * common.MebiByte
}
switch t.platform.GetArch() {
case platform.ARCH_X86_64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
{
Size: 1 * common.MebiByte,
Bootable: true,
Type: disk.BIOSBootPartitionGUID,
UUID: disk.BIOSBootPartitionUUID,
},
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: bootSize,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 500 * common.MebiByte,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
}, true
case platform.ARCH_AARCH64:
return disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
},
},
{
Size: bootSize,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
}, true
case platform.ARCH_PPC64LE:
return disk.PartitionTable{
UUID: "0x14fc63d2",
Type: "dos",
Partitions: []disk.Partition{
{
Size: 4 * common.MebiByte,
Type: "41",
Bootable: true,
},
{
Size: bootSize,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
},
platform.ARCH_AARCH64.String(): disk.PartitionTable{
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
Type: "gpt",
Partitions: []disk.Partition{
{
Size: 200 * common.MebiByte,
Type: disk.EFISystemPartitionGUID,
UUID: disk.EFISystemPartitionUUID,
Payload: &disk.Filesystem{
Type: "vfat",
UUID: disk.EFIFilesystemUUID,
Mountpoint: "/boot/efi",
Label: "EFI-SYSTEM",
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
FSTabFreq: 0,
FSTabPassNo: 2,
}, true
case platform.ARCH_S390X:
return disk.PartitionTable{
UUID: "0x14fc63d2",
Type: "dos",
Partitions: []disk.Partition{
{
Size: bootSize,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Bootable: true,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
{
Size: 500 * common.MebiByte,
Type: disk.XBootLDRPartitionGUID,
UUID: disk.FilesystemDataUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Type: disk.FilesystemDataGUID,
UUID: disk.RootPartitionUUID,
Payload: &disk.Filesystem{
Type: "xfs",
Label: "root",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
platform.ARCH_PPC64LE.String(): disk.PartitionTable{
UUID: "0x14fc63d2",
Type: "dos",
Partitions: []disk.Partition{
{
Size: 4 * common.MebiByte,
Type: "41",
Bootable: true,
},
{
Size: 500 * common.MebiByte,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
platform.ARCH_S390X.String(): disk.PartitionTable{
UUID: "0x14fc63d2",
Type: "dos",
Partitions: []disk.Partition{
{
Size: 500 * common.MebiByte,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/boot",
Label: "boot",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
{
Size: 2 * common.GibiByte,
Bootable: true,
Payload: &disk.Filesystem{
Type: "xfs",
Mountpoint: "/",
FSTabOptions: "defaults",
FSTabFreq: 0,
FSTabPassNo: 0,
},
},
},
},
}, true
default:
return disk.PartitionTable{}, false
}
}

View file

@ -32,6 +32,10 @@ type DiskImage struct {
OSProduct string
OSVersion string
OSNick string
// InstallWeakDeps enables installation of weak dependencies for packages
// that are statically defined for the payload pipeline of the image.
InstallWeakDeps *bool
}
func NewDiskImage() *DiskImage {
@ -57,6 +61,9 @@ func (img *DiskImage) InstantiateManifest(m *manifest.Manifest,
osPipeline.OSProduct = img.OSProduct
osPipeline.OSVersion = img.OSVersion
osPipeline.OSNick = img.OSNick
if img.InstallWeakDeps != nil {
osPipeline.InstallWeakDeps = *img.InstallWeakDeps
}
rawImagePipeline := manifest.NewRawImage(buildPipeline, osPipeline)
rawImagePipeline.PartTool = img.PartTool

View file

@ -167,6 +167,9 @@ type OS struct {
OSVersion string
OSNick string
// InstallWeakDeps enables installation of weak dependencies for packages
// that are statically defined for the pipeline.
// Defaults to True.
InstallWeakDeps bool
}

View file

@ -147,10 +147,10 @@ func (res *Result) Write(writer io.Writer) error {
sort.Strings(pipelineNames)
for _, pipelineName := range pipelineNames {
fmt.Fprintf(writer, "Pipeline %s\n", pipelineName)
fmt.Fprintf(writer, "Pipeline: %s\n", pipelineName)
pipelineMD := res.Metadata[pipelineName]
for _, stage := range res.Log[pipelineName] {
fmt.Fprintf(writer, "Stage %s\n", stage.Type)
fmt.Fprintf(writer, "Stage: %s\n", stage.Type)
fmt.Fprintf(writer, "Output:\n%s\n", stage.Output)
// print structured stage metadata if available
@ -164,8 +164,8 @@ func (res *Result) Write(writer io.Writer) error {
return err
}
}
fmt.Fprint(writer, "\n")
}
fmt.Fprint(writer, "\n")
}
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 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
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,
@ -180,7 +180,7 @@ func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error {
}
type infoResult struct {
Datastores []mo.Datastore
Datastores []mo.Datastore `json:"datastores"`
objects []*object.Datastore
}

94
vendor/github.com/vmware/govmomi/govc/flags/env.go generated vendored Normal file
View file

@ -0,0 +1,94 @@
/*
Copyright (c) 2023-2023 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 flags
import (
"context"
"flag"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/vim25/mo"
)
type EnvBrowser struct {
*ClusterFlag
*HostSystemFlag
*VirtualMachineFlag
}
func (cmd *EnvBrowser) Register(ctx context.Context, f *flag.FlagSet) {
cmd.ClusterFlag, ctx = NewClusterFlag(ctx)
cmd.ClusterFlag.Register(ctx, f)
cmd.HostSystemFlag, ctx = NewHostSystemFlag(ctx)
cmd.HostSystemFlag.Register(ctx, f)
cmd.VirtualMachineFlag, ctx = NewVirtualMachineFlag(ctx)
cmd.VirtualMachineFlag.Register(ctx, f)
}
func (cmd *EnvBrowser) Process(ctx context.Context) error {
if err := cmd.ClusterFlag.Process(ctx); err != nil {
return err
}
if err := cmd.HostSystemFlag.Process(ctx); err != nil {
return err
}
return cmd.VirtualMachineFlag.Process(ctx)
}
func (cmd *EnvBrowser) Browser(ctx context.Context) (*object.EnvironmentBrowser, error) {
c, err := cmd.VirtualMachineFlag.Client()
if err != nil {
return nil, err
}
vm, err := cmd.VirtualMachine()
if err != nil {
return nil, err
}
if vm != nil {
return vm.EnvironmentBrowser(ctx)
}
host, err := cmd.HostSystemIfSpecified()
if err != nil {
return nil, err
}
if host != nil {
var h mo.HostSystem
err = host.Properties(ctx, host.Reference(), []string{"parent"}, &h)
if err != nil {
return nil, err
}
return object.NewComputeResource(c, *h.Parent).EnvironmentBrowser(ctx)
}
finder, ferr := cmd.ClusterFlag.Finder()
if ferr != nil {
return nil, ferr
}
cr, ferr := finder.ComputeResourceOrDefault(ctx, cmd.ClusterFlag.Name)
if ferr != nil {
return nil, ferr
}
return cr.EnvironmentBrowser(ctx)
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 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
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,
@ -31,33 +31,33 @@ type Command struct {
}
type CommandInfoItem struct {
Name string `xml:"name"`
DisplayName string `xml:"displayName"`
Help string `xml:"help"`
Name string `xml:"name" json:"name"`
DisplayName string `xml:"displayName" json:"displayName"`
Help string `xml:"help" json:"help"`
}
type CommandInfoParam struct {
CommandInfoItem
Aliases []string `xml:"aliases"`
Flag bool `xml:"flag"`
Aliases []string `xml:"aliases" json:"aliases"`
Flag bool `xml:"flag" json:"flag"`
}
type CommandInfoHint struct {
Key string `xml:"key"`
Value string `xml:"value"`
Key string `xml:"key" json:"key"`
Value string `xml:"value" json:"value"`
}
type CommandInfoHints []CommandInfoHint
type CommandInfoMethod struct {
CommandInfoItem
Param []CommandInfoParam `xml:"param"`
Hints CommandInfoHints `xml:"hints"`
Param []CommandInfoParam `xml:"param" json:"param"`
Hints CommandInfoHints `xml:"hints" json:"hints"`
}
type CommandInfo struct {
CommandInfoItem
Method []*CommandInfoMethod `xml:"method"`
Method []*CommandInfoMethod `xml:"method" json:"method"`
}
func NewCommand(args []string) *Command {

View file

@ -27,8 +27,8 @@ import (
)
type Fault struct {
Message string
Detail string
Message string `json:"message"`
Detail string `json:"detail"`
}
func (f Fault) Error() string {

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 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
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,
@ -19,9 +19,9 @@ package esxcli
import "github.com/vmware/govmomi/object"
type FirewallInfo struct {
Loaded bool
Enabled bool
DefaultAction string
Loaded bool `json:"loaded"`
Enabled bool `json:"enabled"`
DefaultAction string `json:"defaultAction"`
}
// GetFirewallInfo via 'esxcli network firewall get'

View file

@ -24,9 +24,9 @@ import (
type Values map[string][]string
type Response struct {
Info *CommandInfoMethod
Values []Values
String string
Info *CommandInfoMethod `json:"info"`
Values []Values `json:"values"`
String string `json:"string"`
}
func (v Values) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 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.
@ -29,8 +29,39 @@ import (
"github.com/vmware/govmomi/vim25/types"
)
type KeyValue struct {
Key string
Value string
}
// case insensitive for Key + Value
func (kv *KeyValue) UnmarshalJSON(b []byte) error {
e := struct {
types.KeyValue
Key *string
Value *string
}{
types.KeyValue{}, &kv.Key, &kv.Value,
}
err := json.Unmarshal(b, &e)
if err != nil {
return err
}
if kv.Key == "" {
kv.Key = e.KeyValue.Key // "key"
}
if kv.Value == "" {
kv.Value = e.KeyValue.Value // "value"
}
return nil
}
type Property struct {
types.KeyValue
KeyValue
Spec *ovf.Property `json:",omitempty"`
}

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 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.
@ -161,7 +161,10 @@ func (cmd *ovfx) Prepare(f *flag.FlagSet) (string, error) {
func (cmd *ovfx) Map(op []Property) (p []types.KeyValue) {
for _, v := range op {
p = append(p, v.KeyValue)
p = append(p, types.KeyValue{
Key: v.Key,
Value: v.Value,
})
}
return

View file

@ -1,5 +1,5 @@
/*
Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 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.
@ -171,7 +171,7 @@ func (cmd *spec) Map(e *ovf.Envelope) (res []Property) {
k = fmt.Sprintf("%s.%s", k, *p.Instance)
}
np := Property{KeyValue: types.KeyValue{Key: k, Value: d}}
np := Property{KeyValue: KeyValue{Key: k, Value: d}}
if cmd.Verbose() {
np.Spec = &p.Property[i]
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 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
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,
@ -159,7 +159,7 @@ func (cmd *ps) Run(ctx context.Context, f *flag.FlagSet) error {
type psResult struct {
cmd *ps
ProcessInfo []types.GuestProcessInfo
ProcessInfo []types.GuestProcessInfo `json:"processInfo"`
}
func (r *psResult) Write(w io.Writer) error {

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 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
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,
@ -175,7 +175,7 @@ func (cmd *info) Run(ctx context.Context, f *flag.FlagSet) error {
}
type infoResult struct {
VirtualMachines []mo.VirtualMachine
VirtualMachines []mo.VirtualMachine `json:"virtualMachines"`
objects []*object.VirtualMachine
entities map[types.ManagedObjectReference]string
cmd *info

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2014-2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2014-2023 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
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,
@ -68,7 +68,7 @@ func (cmd *ip) Description() string {
By default the vm.ip command depends on vmware-tools to report the 'guest.ipAddress' field and will
wait until it has done so. This value can also be obtained using:
govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.IpAddress
govc vm.info -json $vm | jq -r .virtualMachines[].guest.ipAddress
When given the '-a' flag, only IP addresses for which there is a corresponding virtual nic are listed.
If there are multiple nics, the listed addresses will be comma delimited. The '-a' flag depends on
@ -78,7 +78,7 @@ by tools for which there is no virtual nic are not included, for example that of
These values can also be obtained using:
govc vm.info -json $vm | jq -r .VirtualMachines[].Guest.Net[].IpConfig.IpAddress[].IpAddress
govc vm.info -json $vm | jq -r .virtualMachines[].guest.net[].ipConfig.ipAddress[].ipAddress
When given the '-n' flag, filters '-a' behavior to the nic specified by MAC address or device name.

View file

@ -284,6 +284,7 @@ func (c *Client) Download(ctx context.Context, src string) (io.ReadCloser, int64
}
p := soap.DefaultDownload
p.Close = true // disable Keep-Alive connection to ESX
if internal.UsingEnvoySidecar(c.ProcessManager.Client()) {
vc = internal.ClientWithEnvoyHostGateway(vc)
@ -346,6 +347,8 @@ func (c *Client) Upload(ctx context.Context, src io.Reader, dst string, p soap.U
return err
}
p.Close = true // disable Keep-Alive connection to ESX
if internal.UsingEnvoySidecar(c.ProcessManager.Client()) {
vc = internal.ClientWithEnvoyHostGateway(vc)
}

View file

@ -21,5 +21,5 @@ const (
ClientName = "govmomi"
// ClientVersion is the version of this SDK
ClientVersion = "0.31.0"
ClientVersion = "0.32.0"
)

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2015 VMware, Inc. All Rights Reserved.
Copyright (c) 2015-2023 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
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,
@ -18,6 +18,7 @@ package object
import (
"context"
"fmt"
"path"
"github.com/vmware/govmomi/property"
@ -84,6 +85,21 @@ func (c ComputeResource) Datastores(ctx context.Context) ([]*Datastore, error) {
return dss, nil
}
func (c ComputeResource) EnvironmentBrowser(ctx context.Context) (*EnvironmentBrowser, error) {
var cr mo.ComputeResource
err := c.Properties(ctx, c.Reference(), []string{"environmentBrowser"}, &cr)
if err != nil {
return nil, err
}
if cr.EnvironmentBrowser == nil {
return nil, fmt.Errorf("%s: nil environmentBrowser", c.Reference())
}
return NewEnvironmentBrowser(c.c, *cr.EnvironmentBrowser), nil
}
func (c ComputeResource) ResourcePool(ctx context.Context) (*ResourcePool, error) {
var cr mo.ComputeResource

View file

@ -278,7 +278,10 @@ func (d Datastore) uploadTicket(ctx context.Context, path string, param *soap.Up
return nil, nil, err
}
p.Ticket = ticket
if ticket != nil {
p.Ticket = ticket
p.Close = true // disable Keep-Alive connection to ESX
}
return u, &p, nil
}
@ -294,7 +297,10 @@ func (d Datastore) downloadTicket(ctx context.Context, path string, param *soap.
return nil, nil, err
}
p.Ticket = ticket
if ticket != nil {
p.Ticket = ticket
p.Close = true // disable Keep-Alive connection to ESX
}
return u, &p, nil
}

View file

@ -0,0 +1,98 @@
/*
Copyright (c) 2023-2023 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 object
import (
"context"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/methods"
"github.com/vmware/govmomi/vim25/types"
)
type EnvironmentBrowser struct {
Common
}
func NewEnvironmentBrowser(c *vim25.Client, ref types.ManagedObjectReference) *EnvironmentBrowser {
return &EnvironmentBrowser{
Common: NewCommon(c, ref),
}
}
func (b EnvironmentBrowser) QueryConfigTarget(ctx context.Context, host *HostSystem) (*types.ConfigTarget, error) {
req := types.QueryConfigTarget{
This: b.Reference(),
}
if host != nil {
ref := host.Reference()
req.Host = &ref
}
res, err := methods.QueryConfigTarget(ctx, b.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}
func (b EnvironmentBrowser) QueryTargetCapabilities(ctx context.Context, host *HostSystem) (*types.HostCapability, error) {
req := types.QueryTargetCapabilities{
This: b.Reference(),
}
if host != nil {
ref := host.Reference()
req.Host = &ref
}
res, err := methods.QueryTargetCapabilities(ctx, b.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}
func (b EnvironmentBrowser) QueryConfigOption(ctx context.Context, spec *types.EnvironmentBrowserConfigOptionQuerySpec) (*types.VirtualMachineConfigOption, error) {
req := types.QueryConfigOptionEx{
This: b.Reference(),
Spec: spec,
}
res, err := methods.QueryConfigOptionEx(ctx, b.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}
func (b EnvironmentBrowser) QueryConfigOptionDescriptor(ctx context.Context) ([]types.VirtualMachineConfigOptionDescriptor, error) {
req := types.QueryConfigOptionDescriptor{
This: b.Reference(),
}
res, err := methods.QueryConfigOptionDescriptor(ctx, b.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}

View file

@ -1,11 +1,11 @@
/*
Copyright (c) 2016 VMware, Inc. All Rights Reserved.
Copyright (c) 2016-2023 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
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,
@ -36,10 +36,10 @@ import (
type HostCertificateInfo struct {
types.HostCertificateManagerCertificateInfo
ThumbprintSHA1 string
ThumbprintSHA256 string
ThumbprintSHA1 string `json:"thumbprintSHA1"`
ThumbprintSHA256 string `json:"thumbprintSHA256"`
Err error
Err error `json:"err"`
Certificate *x509.Certificate `json:"-"`
subjectName *pkix.Name

View file

@ -438,6 +438,17 @@ func (v VirtualMachine) Device(ctx context.Context) (VirtualDeviceList, error) {
return VirtualDeviceList(o.Config.Hardware.Device), nil
}
func (v VirtualMachine) EnvironmentBrowser(ctx context.Context) (*EnvironmentBrowser, error) {
var vm mo.VirtualMachine
err := v.Properties(ctx, v.Reference(), []string{"environmentBrowser"}, &vm)
if err != nil {
return nil, err
}
return NewEnvironmentBrowser(v.c, vm.EnvironmentBrowser), nil
}
func (v VirtualMachine) HostSystem(ctx context.Context) (*HostSystem, error) {
var o mo.VirtualMachine
@ -918,27 +929,6 @@ func (v VirtualMachine) Unregister(ctx context.Context) error {
return err
}
// QueryEnvironmentBrowser is a helper to get the environmentBrowser property.
func (v VirtualMachine) QueryConfigTarget(ctx context.Context) (*types.ConfigTarget, error) {
var vm mo.VirtualMachine
err := v.Properties(ctx, v.Reference(), []string{"environmentBrowser"}, &vm)
if err != nil {
return nil, err
}
req := types.QueryConfigTarget{
This: vm.EnvironmentBrowser,
}
res, err := methods.QueryConfigTarget(ctx, v.Client(), &req)
if err != nil {
return nil, err
}
return res.Returnval, nil
}
func (v VirtualMachine) MountToolsInstaller(ctx context.Context) error {
req := types.MountToolsInstaller{
This: v.Reference(),

View file

@ -79,10 +79,10 @@ type Client struct {
hostsMu sync.Mutex
hosts map[string]string
Namespace string // Vim namespace
Version string // Vim version
Types types.Func
UserAgent string
Namespace string `json:"namespace"` // Vim namespace
Version string `json:"version"` // Vim version
Types types.Func `json:"types"`
UserAgent string `json:"userAgent"`
cookie string
insecureCookies bool
@ -487,11 +487,11 @@ func (c *Client) URL() *url.URL {
}
type marshaledClient struct {
Cookies []*http.Cookie
URL *url.URL
Insecure bool
Version string
UseJSON bool
Cookies []*http.Cookie `json:"cookies"`
URL *url.URL `json:"url"`
Insecure bool `json:"insecure"`
Version string `json:"version"`
UseJSON bool `json:"useJSON"`
}
// MarshalJSON writes the Client configuration to JSON.
@ -727,6 +727,7 @@ type Upload struct {
Headers map[string]string
Ticket *http.Cookie
Progress progress.Sinker
Close bool
}
var DefaultUpload = Upload{
@ -754,7 +755,7 @@ func (c *Client) Upload(ctx context.Context, f io.Reader, u *url.URL, param *Upl
}
req = req.WithContext(ctx)
req.Close = param.Close
req.ContentLength = param.ContentLength
req.Header.Set("Content-Type", param.Type)
@ -812,6 +813,7 @@ type Download struct {
Ticket *http.Cookie
Progress progress.Sinker
Writer io.Writer
Close bool
}
var DefaultDownload = Download{
@ -826,6 +828,7 @@ func (c *Client) DownloadRequest(ctx context.Context, u *url.URL, param *Downloa
}
req = req.WithContext(ctx)
req.Close = param.Close
for k, v := range param.Headers {
req.Header.Add(k, v)