spelling: attribute
This commit is contained in:
parent
e7a30b4ba2
commit
7895051962
|
@ -43,8 +43,8 @@ func (s *stepRunAlicloudInstance) Cleanup(state multistep.StateBag) {
|
||||||
ui := state.Get("ui").(packer.Ui)
|
ui := state.Get("ui").(packer.Ui)
|
||||||
client := state.Get("client").(*ecs.Client)
|
client := state.Get("client").(*ecs.Client)
|
||||||
instance := state.Get("instance").(*ecs.InstanceAttributesType)
|
instance := state.Get("instance").(*ecs.InstanceAttributesType)
|
||||||
instanceAttrubite, _ := client.DescribeInstanceAttribute(instance.InstanceId)
|
instanceAttribute, _ := client.DescribeInstanceAttribute(instance.InstanceId)
|
||||||
if instanceAttrubite.Status == ecs.Starting || instanceAttrubite.Status == ecs.Running {
|
if instanceAttribute.Status == ecs.Starting || instanceAttribute.Status == ecs.Running {
|
||||||
if err := client.StopInstance(instance.InstanceId, true); err != nil {
|
if err := client.StopInstance(instance.InstanceId, true); err != nil {
|
||||||
ui.Say(fmt.Sprintf("Error stopping instance %s, it may still be around %s", instance.InstanceId, err))
|
ui.Say(fmt.Sprintf("Error stopping instance %s, it may still be around %s", instance.InstanceId, err))
|
||||||
return
|
return
|
||||||
|
|
|
@ -33,7 +33,7 @@ type Config struct {
|
||||||
SourceImageList string `mapstructure:"source_image_list"`
|
SourceImageList string `mapstructure:"source_image_list"`
|
||||||
SnapshotTimeout time.Duration `mapstructure:"snapshot_timeout"`
|
SnapshotTimeout time.Duration `mapstructure:"snapshot_timeout"`
|
||||||
DestImageList string `mapstructure:"dest_image_list"`
|
DestImageList string `mapstructure:"dest_image_list"`
|
||||||
// Attributes and Atributes file are both optional and mutually exclusive.
|
// Attributes and Attributes file are both optional and mutually exclusive.
|
||||||
Attributes string `mapstructure:"attributes"`
|
Attributes string `mapstructure:"attributes"`
|
||||||
AttributesFile string `mapstructure:"attributes_file"`
|
AttributesFile string `mapstructure:"attributes_file"`
|
||||||
// Optional; if you don't enter anything, the image list description
|
// Optional; if you don't enter anything, the image list description
|
||||||
|
@ -129,7 +129,7 @@ func NewConfig(raws ...interface{}) (*Config, error) {
|
||||||
err = json.Unmarshal(fidata, &data)
|
err = json.Unmarshal(fidata, &data)
|
||||||
c.attribs = data
|
c.attribs = data
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = fmt.Errorf("Problem parsing json from attrinutes_file: %s", err)
|
err = fmt.Errorf("Problem parsing json from attributes_file: %s", err)
|
||||||
packer.MultiErrorAppend(errs, err)
|
packer.MultiErrorAppend(errs, err)
|
||||||
}
|
}
|
||||||
c.attribs = data
|
c.attribs = data
|
||||||
|
|
Loading…
Reference in New Issue