Skip to content

Commit

Permalink
Update amazonebs to AmazonElasticBlockStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
xxx0624 committed Sep 15, 2023
1 parent 3a10ec4 commit 9eb696c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ecs-agent/acs/session/attach_resource_responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ func validateAttachmentAndReturnProperties(message *ecsacs.ConfirmAttachmentMess
attachmentProperties[name] = value
}

// For "amazonebs" used by the EBS attach, ACS is using attachmentType to indicate its attachment type.
// For "AmazonElasticBlockStorage" used by the EBS attach, ACS is using attachmentType to indicate its attachment type.
attachmentType := aws.StringValue(message.Attachment.AttachmentType)
if attachmentType == resource.AmazonEBS {
if attachmentType == resource.AmazonElasticBlockStorage {
err = resource.ValidateRequiredProperties(
attachmentProperties,
resource.GetVolumeSpecificPropertiesForEBSAttach(),
Expand Down
4 changes: 2 additions & 2 deletions ecs-agent/acs/session/attach_resource_responder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func testValidateAttachmentAndReturnPropertiesWithoutAttachmentType(t *testing.T
}

// testValidateAttachmentAndReturnPropertiesWithAttachmentType verifies all required properties for attachment
// type: "amazonebs".
// type: "AmazonElasticBlockStorage".
func testValidateAttachmentAndReturnPropertiesWithAttachmentType(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
Expand Down Expand Up @@ -217,7 +217,7 @@ func testValidateAttachmentAndReturnPropertiesWithAttachmentType(t *testing.T) {
require.NoError(t, err)

// Reset attachment to be a good one with valid attachment type.
confirmAttachmentMessageCopy.Attachment.AttachmentType = aws.String("amazonebs")
confirmAttachmentMessageCopy.Attachment.AttachmentType = aws.String("AmazonElasticBlockStorage")
confirmAttachmentMessageCopy.Attachment.AttachmentProperties = testAttachmentPropertiesForEBSAttach

// Verify all required properties for the attachment for EBS attach are present.
Expand Down
2 changes: 1 addition & 1 deletion ecs-agent/api/resource/resource_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

type ResourceAttachment struct {
attachmentinfo.AttachmentInfo
// AttachmentType is the type of the resource attachment which can be "amazonebs" for EBS attach tasks.
// AttachmentType is the type of the resource attachment which can be "AmazonElasticBlockStorage" for EBS attach tasks.
AttachmentType string
// AttachmentProperties is a map storing (name, value) representation of attachment properties.
// Each pair is a set of property of one resource attachment.
Expand Down
4 changes: 2 additions & 2 deletions ecs-agent/api/resource/resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ const (
// ElasticBlockStorage is one of the resource types in the properties list of the attachment payload message for the
// EBS volume on firecracker.
ElasticBlockStorage = "ElasticBlockStorage"
// AmazonEBS is one of the attachment types in the attachment payload message for EBS attach tasks on warmpool.
AmazonEBS = "amazonebs"
// AmazonElasticBlockStorage is one of the attachment types in the attachment payload message for EBS attach tasks on warmpool.
AmazonElasticBlockStorage = "AmazonElasticBlockStorage"
)

0 comments on commit 9eb696c

Please sign in to comment.