@@ -23,16 +23,17 @@ import (
23
23
24
24
"github.com/aws/amazon-ecs-agent/agent/api"
25
25
"github.com/aws/amazon-ecs-agent/agent/config"
26
- "github.com/aws/amazon-ecs-agent/agent/credentials/instancecreds"
27
26
"github.com/aws/amazon-ecs-agent/agent/ec2"
28
27
"github.com/aws/amazon-ecs-agent/agent/utils"
29
28
agentversion "github.com/aws/amazon-ecs-agent/agent/version"
30
29
apicontainerstatus "github.com/aws/amazon-ecs-agent/ecs-agent/api/container/status"
30
+ "github.com/aws/amazon-ecs-agent/ecs-agent/api/ecs/model/ecs"
31
31
apierrors "github.com/aws/amazon-ecs-agent/ecs-agent/api/errors"
32
32
"github.com/aws/amazon-ecs-agent/ecs-agent/async"
33
- "github.com/aws/amazon-ecs-agent/ecs-agent/ecs_client/model/ecs "
33
+ "github.com/aws/amazon-ecs-agent/ecs-agent/credentials/instancecreds "
34
34
"github.com/aws/amazon-ecs-agent/ecs-agent/httpclient"
35
35
"github.com/aws/amazon-ecs-agent/ecs-agent/logger"
36
+ commonutils "github.com/aws/amazon-ecs-agent/ecs-agent/utils"
36
37
"github.com/aws/amazon-ecs-agent/ecs-agent/utils/retry"
37
38
38
39
"github.com/aws/aws-sdk-go/aws"
@@ -322,12 +323,12 @@ func (client *APIECSClient) getResources() ([]*ecs.Resource, error) {
322
323
portResource := ecs.Resource {
323
324
Name : utils .Strptr ("PORTS" ),
324
325
Type : utils .Strptr ("STRINGSET" ),
325
- StringSetValue : utils .Uint16SliceToStringSlice (client .config .ReservedPorts ),
326
+ StringSetValue : commonutils .Uint16SliceToStringSlice (client .config .ReservedPorts ),
326
327
}
327
328
udpPortResource := ecs.Resource {
328
329
Name : utils .Strptr ("PORTS_UDP" ),
329
330
Type : utils .Strptr ("STRINGSET" ),
330
- StringSetValue : utils .Uint16SliceToStringSlice (client .config .ReservedPortsUDP ),
331
+ StringSetValue : commonutils .Uint16SliceToStringSlice (client .config .ReservedPortsUDP ),
331
332
}
332
333
333
334
return []* ecs.Resource {& cpuResource , & memResource , & portResource , & udpPortResource }, nil
@@ -657,14 +658,14 @@ func (client *APIECSClient) SubmitContainerStateChange(change api.ContainerState
657
658
}
658
659
659
660
func (client * APIECSClient ) SubmitAttachmentStateChange (change api.AttachmentStateChange ) error {
660
- attachmentStatus := change .Attachment .Status . String ()
661
+ attachmentStatus := change .Attachment .GetAttachmentStatus ()
661
662
662
663
req := ecs.SubmitAttachmentStateChangesInput {
663
664
Cluster : & client .config .Cluster ,
664
665
Attachments : []* ecs.AttachmentStateChange {
665
666
{
666
- AttachmentArn : aws .String (change .Attachment .AttachmentARN ),
667
- Status : aws .String (attachmentStatus ),
667
+ AttachmentArn : aws .String (change .Attachment .GetAttachmentARN () ),
668
+ Status : aws .String (attachmentStatus . String () ),
668
669
},
669
670
},
670
671
}
0 commit comments