usharesoft / hammr

Command-line tool for building consistent and repeatable machine images for multiple cloud platforms
http://hammr.io
Apache License 2.0
28 stars 24 forks source link

Builder for CloudStack failed #414

Closed ghost closed 6 years ago

ghost commented 6 years ago

When trying to build a template with the builder from the documentation http://docs.usharesoft.com/projects/hammr/en/latest/pages/machine-images/builders/builders-cloudstack.html, the following error is displayed:

INFO: Checking default credentials file...
INFO: no username provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.yml
you provided a yaml file, checking the syntax...
INFO: You provided a yaml file, checking...
Generating 'CloudStack KVM (QCOW2)' image (1/1)
ERROR: Error: no hardwareSettings part for builder [CloudStack KVM (QCOW2)]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/hammr/commands/template/template.py", line 434, in do_build
    myimage,myinstallProfile = func(myimage, builder, myinstallProfile, self.api, self.login)
ValueError: too many values to unpack

The YAML file

stack:
  name: PSTAS-69
  version: '1.0'
  installation:
    internetSettings: basic
    diskSize: 12288
    swapSize: 512
  os:
    name: CentOS
    version: '7'
    arch: x86_64
    profile: Minimal
builders:
- type: CloudStack KVM (QCOW2)
  account:
    type: CloudStack
    name: My CloudStack account
    publicApiKey: mypublicapikey
    secretApiKey: mysecretapiKey
    endpointUrl: myendpointurl
  imageName: CentOS Core
  zone: zone1
  description: my description

==> Missing the mandatory hardwareSetting in the example.

AliceAlbano commented 6 years ago

Fixed by #429