Giter VIP home page Giter VIP logo

hammr's Introduction

Hammr Build Status

A command-line tool for building consistent and repeatable machine images for different platforms.

Hammr supports the following platforms and machine image formats:

  • Amazon EC2 (AMI) - EBS-backed and Ephemeral
  • VMware : Desktop (Workstation, Fusion, Player); vSphere vCenter; vCloud Director
  • Microsoft Azure
  • Docker
  • Google Compute Engine
  • Fujitsu K5
  • SuseCloud
  • CloudStack
  • OpenStack - para-virt and full-girt images
  • Citrix Xen Server
  • Hyper-V
  • ISO
  • KVM
  • OVF
  • QCOW2
  • Raw
  • Vagrant Base Box
  • VirtualBox
  • VHD
  • Xen

Documentation

Please visit: http://docs.usharesoft.com/projects/hammr/en/latest

Installation

Hammr is based on python, consequently it supports all major operating systems. The easiest way to install hammr is using pip.

$ sudo pip install hammr

Installing From Source

Hammr has a dependency to uforge_python_sdk. First, you need to install it:

$ sudo pip install uforge_python_sdk

or download sources from pypi: https://pypi.python.org/pypi/uforge_python_sdk

Go to the source directory where the setup.py file is located.

To compile and install, run:

$ python setup.py build && sudo python setup.py install

Now clone the hammr git repository to get all the source files. Next go to the source directory where the setup.py file is located. To compile and install, run:

$ python setup.py build && sudo python setup.py install

This will automatically create the hammr executable and install it properly on your system.

To check that this was successful, run:

$ hammr -v

Upgrading

If you have already installed hammr, and you want to upgrade to the latest version, use:

$ sudo pip install --upgrade hammr

Feedback

If you have any questions or feedback, get in touch at [email protected] or via: Hammr Google Group

License

Hammr is licensed under the Apache 2.0 license. For more information, please refer to LICENSE file.

hammr's People

Contributors

alicealbano avatar ammarjohar avatar calfo avatar cinlloc avatar dimitriscole avatar emuus avatar hugo6 avatar jbremond avatar jfknoepfli avatar jgweir avatar lauraviles avatar maxtakahashi avatar nrouss38 avatar ntith avatar numerinico avatar obourdon avatar paulcartier avatar segalaj avatar sferot avatar shigeruichihashi avatar sohnoun avatar tdebru avatar thachmai avatar thesmartmonkey avatar vinc-powa avatar yvan-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hammr's Issues

hammr template create pulls file with http/ftp in filename uneccessarily

$  hammr template create --file template.json
Validating the template file [template.json] ...
OK: Syntax of template file [template.json] is ok
Downloadling file httpd-devel-2.2.15-39.el6.centos.x86_64.rpm: 
Status: 100% |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| Time: 0:00:00
Downloadling file httpd-tools-2.2.15-39.el6.centos.x86_64.rpm: 
Status: 100% |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| Time: 0:00:00
Downloadling file psa-proftpd-1.3.5-cos6.build1200140529.18.x86_64.rpm: 
Status: 100% |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| Time: 0:00:00
Downloadling file httpd-2.2.15-39.el6.centos.x86_64.rpm: 
Status: 100% |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| Time: 0:00:00

I believe the Downloadling file xyz is because I define files with tcp application layer protocols in the name.

eg

"name": "httpd-devel.rpm",
"source": "bundles/httpd-devel/2.2.15/x86_64/httpd-devel-2.2.15-39.el6.centos.x86_64.rpm",
"install" : true
},{
"name": "psa-proftpd.rpm",
"source": "bundles/psa-proftpd/1.3.5/x86_64/psa-proftpd-1.3.5-cos6.build1200140529.18.x86_64.rpm",
"install" : true

has http and ftp as substring in the path or "name" or "source" attribute values.

Cannot export large template with Hammr.

Hi,

Cannot export large template with Hammr.

  • Environment: CentOS 6 x86_64 (4.8GB memory) + hammr '0.2.5.5'.
  • The template has 3.8 GB file in my software.
  • "hammr template export" failed with memory error.
[root@hammr-351 ~]# hammr template export --id 126
Exporting template with id [126] :
100%|#############################################################################################################################################################|
Downloading archive...
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/template/template.py", line 105, in do_export
    data = self.api.Users(self.login).Appliances(myAppliance.dbId).Exports(applianceExport.dbId).Downloads.Download()
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 566, in Download
    return self._REST('/users/' + str(self._get('Uid')) + '/appliances/' + str(self._get('Aid')) + '/exports/' + str(self._get('Eid')) + '/downloads', 'GET', body, **kwargs)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 93, in _REST
    resp, content = obj._client.request(fullUrl, method.upper(), body = body, headers = requestHttpHeader)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1593, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1335, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1318, in _conn_request
    content = response.read()
  File "/usr/lib64/python2.6/httplib.py", line 522, in read
    return self._read_chunked(amt)
  File "/usr/lib64/python2.6/httplib.py", line 601, in _read_chunked
    return ''.join(value)
MemoryError
  • The exported file is 3.5GB. The export itself seems to succeed.
-bash-4.1# ll -h /tmp/USER_DATA/FactoryContainer/users/k_takahashi/appliances/126/exports/54/420-test.tar.gz
-rw-r--r-- 1 root root 3.5G Sep 18 19:32 /tmp/USER_DATA/FactoryContainer/users/k_takahashi/appliances/126/exports/54/420-test.tar.gz

Thanks.

Bundle http url - does not check for error

When creating a template with a bundle referenced by an http url, hammr does not check for error return code.

The bundle file has this:

cat test.deb

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /infrastructure/test.deb was not found on this server.</p>
<hr>
<address>Apache/2.2.22 (Ubuntu) Server at 10.10.10.10 Port 80</address>
</body></html>

"hammr image puglish" returns an exception when template.json includes Japanese characters.

Hi,

"hammr image puglish" returns exception when template.json includes Japanese characters in "builder" - "description".

Here is how to reproduce this issue.

  • create template.json
{
  "stack" : {
    "name" : "MyTemplate",
    "version" : "1.0",
    "description": "これはhammrを使って作成したテンプレートです。",
    "os" : {
      "name" : "RedHat Enterprise Linux",
      "version" : "6.5",
      "arch" : "x86_64",
      "profile" : "Minimal",
      "pkgs": [
        {
          "name": "curl"
        },
        {
          "name": "file"
        },
        {
          "name": "tar"
        },
        {
          "name": "wget"
        },
        {
          "name": "which"
        }
      ]
    },
    "installation" : {
      "keyboard": "jp106",
      "timezone": "Asia/Tokyo",
      "diskSize": 12288,
      "swapSize": 512
    }
  },
  "builders": [
    {
      "type": "openstack-qcow2",
      "account": {
        "type": "openstack",
        "name": "test",
        "endpoint": "http://test:9292",
        "keystoneEndpoint": "http://test:5000/v2.0",
        "username": "user",
        "password": "password"
      },
      "tenant": "maximizedev",
      "imageName": "myTemplate",
      "description": "OpenStack配信テスト"
    }
  ]
}
  • create template, build image.
hammr template create --file template.json
hammr template build --file template.json
  • publish the image. Hammr returns an exception.
[root@hammr-351 templates]# hammr image publish --file template.json
Validating the template file [template.json] ...
OK: Syntax of template file [template.json] is ok
Publishing 'openstack-qcow2' image (1/1)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/image/image.py", line 147, in do_publish
    rCode = self.publish_builder(builder, template, appliance, rInstallProfile, i, None)
  File "/usr/lib/python2.6/site-packages/hammr/commands/image/image.py", line 409, in publish_builder
    rpImage = self.api.Users(self.login).Appliances(appliance.dbId).Images(comliantImage.dbId).Pimages().Publish(mypImage)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 820, in Publish
    return self._REST('/users/' + str(self._get('Uid')) + '/appliances/' + str(self._get('Aid')) + '/images/' + str(self._get('Itid')) + '/pimages', 'POST', body, **kwargs)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 93, in _REST
    resp, content = obj._client.request(fullUrl, method.upper(), body = body, headers = requestHttpHeader)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1593, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1335, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1258, in _conn_request
    conn.request(method, request_uri, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 954, in _send_request
    self.send(body)
  File "/usr/lib64/python2.6/httplib.py", line 759, in send
    self.sock.sendall(str)
  File "/usr/lib64/python2.6/ssl.py", line 200, in sendall
    amount = len(data)
TypeError: object of type 'publishImage' has no len()

Thanks.

How to specify URL for source field in bundle - files.

Hi,

I would like to use URL for source field in bundle - files when importing a template.
But UForge returns an error.

[root@localhost tmp]# hammr template import --file archive.tar.gz
Importing template from [archive.tar.gz] archive ...
100%|##############################|
ERROR: Template import: Unknown server error. Please contact UForge support.

Server side log:

-bash-4.1# cat oar_applianceimport_job4.stdout
2015-04-28 08:54:29 WARN  DbManager:109 - LONG DB INSTRUCTION 2.782 secs init (com.usharesoft.db.DbAccess>>DbAccess.java:init:43)

2015-04-28 08:54:29 INFO  InstanceImportObject:114 - Status: 1% done. Unpackaging import archive
2015-04-28 08:54:30 INFO  InstanceImportObject:227 - (cd /tmp/USER_DATA/FactoryContainer/users/k_takahashi/imports/4/uploads/extracted_archive; /bin/tar xvzf ../import_archive)
2015-04-28 08:54:30 INFO  InstanceImportObject:270 - Creating appliance : test
2015-04-28 08:54:30 INFO  InstanceImportObject:308 - appliance parent URI : users/k_takahashi
2015-04-28 08:54:30 INFO  InstanceImportObject:114 - Status: 20% done. Preliminary check
2015-04-28 08:54:30 INFO  InstanceImportObject:463 - SELECT ap_id from UserCreatedAppliances as a where login='k_takahashi' AND appliance='test' AND version='1.0'
2015-04-28 08:54:30 INFO  InstanceImportObject:519 - SELECT d.* from  Distributions as d where CONCAT(name,' ',version)='CentOS 6' AND arch='x86_64'
2015-04-28 08:54:30 INFO  InstanceImportObject:530 - ditribution name = CentOS 6
2015-04-28 08:54:31 INFO  InstanceImportObject:648 - SELECT db_id from PkgGroups where distrib_id='0' AND name='test-work' AND version='1.0' AND uri like 'users/k_takahashi/%'
2015-04-28 08:54:32 ERROR MySoftwareService:148 - File not found for Pkg: file:/tmp/USER_DATA/FactoryContainer/users/k_takahashi/imports/4/uploads/extracted_archive/http:/repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.1-1.el6.x86_64.rpm
2015-04-28 08:54:32 ERROR InstanceImportObject:300 - com.usharesoft.services.exceptions.UForgeException: java.io.FileNotFoundException: /tmp/USER_DATA/FactoryContainer/users/k_takahashi/imports/4/uploads/extracted_archive/http:/repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.1-1.el6.x86_64.rpm (No such file or directory)
2015-04-28 08:54:32 ERROR InstanceImportObject:170 - Setting import error : Unknown server error. Please contact UForge support.
2015-04-28 08:54:32 ERROR InstanceImportObject:188 - Impossible to rollback appliance
java.lang.NullPointerException
        at com.usharesoft.services.InstallProfilesService.delete(InstallProfilesService.java:198)
        at com.usharesoft.services.InstallProfilesService.delete(InstallProfilesService.java:180)
        at com.usharesoft.services.AppliancesService.deleteAppliance(AppliancesService.java:250)
        at com.usharesoft.services.AppliancesService.deleteAppliance(AppliancesService.java:187)
        at com.usharesoft.distrotools.InstanceImportObject.setImportError(InstanceImportObject.java:183)
        at com.usharesoft.distrotools.InstanceImportObject.importObject(InstanceImportObject.java:302)
        at com.usharesoft.distrotools.cmds.ImportExportEnv.main(ImportExportEnv.java:62)
2015-04-28 08:54:32 INFO  InstanceImportObject:840 - Do cleanup

Could you please show me how to use URL value for the source filed in bundle - files?
http://hammr.io/?page_id=835

Hereunder is what I did:

  • export a template.
  • extract the archive and replace "source" value from native path to URL in template.json file.
# cat template.json
...
    "bundles" : [ {
...
      "files" : [ {
        "name" : "zabbix-2.2.2-1.el6.x86_64.rpm",
        "source" : "http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-2.2.1-1.el6.x86_64.rpm"
  • tar the files except bundle files.
  • import the archive.

Object IDs as a Hammr command result.

Hammr command displays object IDs (for example created template ID) to STDOUT.
It is not easy to get object IDs from scripts. We need to parse stdout to get such IDs.

Thanks.

Hammr failed parsing UForge exception

The current Hammr master version failed to parse UForge exception (when getting exception from the service):
UForge Error '500' with method: GET http://10.1.2.105:8080/ufws/users/generation/appliances/10/images/10/status Message: Unable to authenticate your user. Please contact support. 'module' object has no attribute 'get_uforge_exception'

Missing dependencies when installing hammr on Debian 7

Following the current instruction set found on http://hammr.io/?page_id=57

# wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
# python get-pip.py 
# apt-get install python-dev gcc
# easy_install progressbar==2.3
# pip install hammr
...
    ERROR: /bin/sh: 1: xslt-config: not found
...

Resolved using the following commands:
# apt-get install apt-file
# apt-file update
# apt-file search xslt-config
libxslt1-dev: /usr/bin/xslt-config
# apt-get install libxslt1-dev
# pip install hammr

Exception when debugging hammr in Pycharm Community edition

Traceback (most recent call last):
File "/home/olivier/pycharm-community-4.5.1/helpers/pydev/pydevd.py", line 2357, in
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/olivier/pycharm-community-4.5.1/helpers/pydev/pydevd.py", line 1777, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/olivier/HAMMR/hammr/src/bin/hammr", line 7, in
import hammr.hammr
File "/home/olivier/HAMMR/hammr/src/hammr/hammr.py", line 26, in
import commands
File "/home/olivier/HAMMR/hammr/src/hammr/commands/init.py", line 11, in
from quota import *
File "/home/olivier/HAMMR/hammr/src/hammr/commands/quota/quota.py", line 20
SyntaxError: Non-ASCII character '\xe2' in file /home/olivier/HAMMR/hammr/src/hammr/commands/quota/quota.py on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Process finished with exit code 1

In fact this char is the single-quote one but not ascii encoded

User has to enter the account password even if the command syntax is wrong

This is a RFE.

If, for instance, the user executes the following command :

# hammr -a https://uforge.usharesoft.com/api -u user1 template create
Password: ************      ( << the user enters the password manually)
ERROR: In Arguments: argument --file is required
Create a new template and save to the UForge server

usage: template create [-h] --file FILE [--archive-path ARCHIVE_PATH] [-f]
                       [-r] [--usemajor]

optional arguments:
  -h, --help            show this help message and exit

mandatory arguments:
  --file FILE           json file containing the template content

optional arguments:
  --archive-path ARCHIVE_PATH
                        path of where to store the archive of the created
                        template. If provided hammr, creates an archive of the
                        created template, equivalent to running template
                        export
  -f, --force           force template creation (delete template/bundle if
                        already exist)
  -r, --rbundles        if a bundle already exists, use it in the new
                        template. Warning: this option ignore the content of
                        the bundle described in the template file
  --usemajor            use distribution major version if exit

The user has to enter the password even if the command syntax is not correct.
It could be nice to display the error message and usage before asking for the user password.

Cannot publish to CloudStack ?

Hi,

I cannot publish to CloudStack with Hammr.

[root@hammr-351 templates]# hammr image publish --file fj3.json
INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.json
INFO: Using url https://myforge/api
Validating the template file [fj3.json] ...
OK: Syntax of template file [fj3.json] is ok
Publishing 'cloudstack-qcow2' image (1/1)
ERROR: UForge Error '400' with method: POST http://myforge:9090/ufws-3.3/users/k_takahashi/appliances/82/images/81/pimages
Message:
        ERROR.CREDACCOUNT.MISSING_TEMPLATE_DESCRIPTION

There is no description field in the documentation.
http://hammr.io/?page_id=975

I have added "description" to the config json like:

...
  "builders": [
    {
      "type": "cloudstack-qcow2",
      "hardwareSettings": {
        "memory": 1024,
        "hwType": 7
      },
      "account": {
        "name": "cloudn dev"
      },
      "imageName": "CentOS 6",
      "publicImage": false,
      "featured" : false,
      "description": "centos 6",
      "zone": "jp-e1a"
    }
  ]
}

But the result is the same.

What parameter name should I use ?

Thanks.

Cannot use openstack-vhd format.

Dear Hammr developer,

I cannot use openstack-vhd format though the user has access right to openstack-vhd format and can generate from UForge Portal UI.

  • The user has right to the format
-bash-4.1# uforge user format list --account the_user -u root -p xxx | grep open
| openstackqcow2   |   X    |
| openstackvdi     |   X    |
| openstackvhd     |   X    |
| openstackvmdk    |   X    |
  • But cannot find the format from Hammr
[root@localhost templates]# hammr format list | grep open
| openstack-qcow2  | True   | True   |                |      X       |                 |
| openstack-vdi    | True   | True   |                |      X       |                 |
| openstack-vmdk   | True   | True   |                |      X       |                 |
  • Hereunder is the request body Hammr posts:
<image>
    <compress>false</compress>
    <format>
        <name>openstackqvhd</name>
    </format>
    <installProfile>
        <diskSize>131077</diskSize>
        <swapSize>512</swapSize>
    </installProfile>
</image>

I think "openstackqvhd" should be "openstackvhd".

Best Regards,
Takahashi.

Compiling from src fails on mac osx

Following documentation:-

http://hammr.io/?page_id=695
1: curl -O https://pypi.python.org/pypi/uforge_python_sdk
2: cd uforge_python_sdk
3: python setup.py build;sudo setup.py. install
4: git clone https://github.com/usharesoft/hammr.git
5: cd hammr
6: python setup.py build
osx-mac:src$ python setup.py build
running build
running build_py
running build_scripts
7: sudo setup.py install
osx-mac:src$ sudo setup.py install
sudo: setup.py: command not found

any ideas?.

Hammr does not run on 64bit CentOS 6.6. machine

# more /etc/redhat-release 
CentOS release 6.6 (Final)
# uname -a
Linux ws1 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
# wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py ; python get-pip.py  ; yum install gcc python-devel libxml2-devel libxslt-devel ; easy_install progressbar==2.3 ; pip install hammr

At this point everything when fine

# hammr -v
Traceback (most recent call last):
  File "/usr/bin/hammr", line 7, in 
    import hammr.hammr
  File "/usr/lib/python2.6/site-packages/hammr/hammr.py", line 26, in 
    import commands
  File "/usr/lib/python2.6/site-packages/hammr/commands/__init__.py", line 10, in 
    from scan import *
  File "/usr/lib/python2.6/site-packages/hammr/commands/scan/scan.py", line 7, in 
    import paramiko
  File "/usr/lib/python2.6/site-packages/paramiko/__init__.py", line 64, in 
    from transport import SecurityOptions, Transport
  File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 33, in 
    from paramiko import util
  File "/usr/lib/python2.6/site-packages/paramiko/util.py", line 33, in 
    from paramiko.common import *
  File "/usr/lib/python2.6/site-packages/paramiko/common.py", line 98, in 
    from Crypto import Random
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/__init__.py", line 29, in 
    from Crypto.Random import _UserFriendlyRNG
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 38, in 
    from Crypto.Random.Fortuna import FortunaAccumulator
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaAccumulator.py", line 39, in 
    import FortunaGenerator
  File "/usr/lib64/python2.6/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py", line 34, in 
    from Crypto.Util.number import ceil_shift, exact_log2, exact_div
  File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in 
    if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC:
AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'

The API end point for factory.usharesoft.com has been changed?

Hi,

Hammr returns an error when I use "/ufws-3.3" for the api end point according to the guide.
http://hammr.io/?page_id=528

# hammr os list --url https://factory.usharesoft.com:443/ufws-3.3 -u user -p xxx
Getting distributions for [xxx] ...
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/os/os.py", line 35, in do_list
    distributions = self.api.Users(self.login).Distros.Getall(None, None)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 1549, in Getall
    return self._REST('/users/' + str(self._get('Uid')) + '/distros', 'GET', body, **kwargs)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 95, in _REST
    raise Exception(_Objects.parseString(content, True))
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 48, in parseString
    raise exception
XMLSyntaxError: Opening and ending tag mismatch: HR line 1 and body, line 1, column 946

The command has been succeeded with "/api" for the API end point.

hammr version '0.2.5.2'

Thanks.

pkg "fullname" is not accepted.

http://hammr.io/?page_id=832
states:

fullname (optional): a string providing the name, version, release and architecture information. If used, the mandatory name key is not required.

But when I create a template with the following:

},{
"fullname": "ustr-1.0.4-9.1.el6.x86_64"
},{
"fullname": "util-linux-ng-2.17.2-12.14.el6_5.x86_64"
},{
"fullname": "vim-minimal-7.2.411-1.8.el6.x86_64"
},{
"fullname": "which-2.19-6.el6.x86_64"
},{
"fullname": "wireless-tools-29-5.1.1.el6.x86_64"
},{
"fullname": "xcb-util-0.3.6-1.el6.x86_64"
},{
"fullname": "xz-libs-4.999.9-0.3.beta.20091007git.el6.x86_64"
},{
"fullname": "yum-3.2.29-43.el6.centos.noarch"
},{

I get a server side error thrown:

Unrecognized field "fullname"

Dependency error at runtime

When you have installed both uforge-python-sdk 3.5.1.x and uforge-python-sdk 3.6.x, and you use a hammr version which require uforge_python_sdk>=3.5.1.3, <3.6, there is an error at runtime.
Hammr try to last the newer version of uforge-python-sdk instead of the one describe in the require field of setup.py:

Traceback (most recent call last):
  File "/usr/bin/hammr", line 7, in <module>
    import hammr.hammr
  File "/usr/lib/python2.7/site-packages/hammr/hammr.py", line 32, in <module>
    import commands as cmds
  File "/usr/lib/python2.7/site-packages/hammr/commands/__init__.py", line 3, in <module>
    from account import *
  File "/usr/lib/python2.7/site-packages/hammr/commands/account/account.py", line 7, in <module>
    from hammr.utils import *
  File "/usr/lib/python2.7/site-packages/hammr/utils/generics_utils.py", line 13, in <module>
    from uforge.objects.xsd0 import *
ImportError: No module named xsd0

"name" filed should not be required if account information is defined or "file" is provided in the JSON

Hi,

How can I describe the account section if I would like to use account information in it ?

From the documentation, It is allowed to define publish account information in the builder section in the JSON.
http://hammr.io/?page_id=987

  "builders": [
    {
      "type": "openstack-qcow2",
      "account": {
        "type": "openstack",
        "name": "My OpenStack Account",
        "endpoint": "http://ow2-04.xsalto.net:9292/v1",
        "keystoneEndpoint": "http://ow2-04.xsalto.net:5000/v2.0",
        "username": "test",
        "password": "password"
      },

The "account" - "name" field is mandatory and hammr also checks if the cloud account is registered in the AppCenter with the "name".

[root@hammr-351 tmp]# hammr image publish --file build-mytemplate1.0.json
INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.json
INFO: Using url https://s.maximize.jp:9062/api
Validating the template file [build-mytemplate1.0.json] ...
OK: Syntax of template file [build-mytemplate1.0.json] is ok
Publishing 'openstack-qcow2' image (1/1)
ERROR: No accounts available with name My OpenStack Account

It isn't allowed actually ?

Thanks.

Hammr throws a funny error even when the archive is successfully uploaded

Funny output shown when launching hammr template create

$ hammr template create --force --file template.json
Validating the template file [template.json] ...
OK: Syntax of template file [template.json] is ok
Creating template from temporary [/tmp/hammr-16101/archive.tar.gz] archive ...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/hammr-0.2.3-py2.7.egg/hammr/commands/template/template.py", line 278, in do_create
    r = self.import_stack(tar_path, False, doArgs.force)
  File "/usr/lib/python2.7/site-packages/hammr-0.2.3-py2.7.egg/hammr/commands/template/template.py", line 532, in import_stack
    printer.out("File error: "+e.strerror, printer.ERROR)
TypeError: cannot concatenate 'str' and 'NoneType' objects

cannot publish or download images generated with Hammr.

Hi,

I cannot publish or download images generated with Hammr.
UForge returns a message:

Unable to publish this image as this image is only a simulation (no actual image created).

json file is:

{
  "stack" : {
    "name" : "test",
    "version" : "1.0",
    "description": "This is a hammr example.",
    "os" : {
      "name" : "RedHat Enterprise Linux",
      "version" : "6",
      "arch" : "i386",
      "profile" : "Minimal",
      "pkgs": [
        {
          "name": "php"
        },
        {
          "name": "php-cli"
        },
        {
          "name": "php-common"
        },
        {
          "name": "php-mysql"
        }
      ]
    },
    "installation" : {
      "keyboard": "jp106",
      "timezone": "Asia/Tokyo",
      "diskSize": 20480,
      "swapSize": 512
    }
  },
  "builders": [
    {
      "type": "openstack-qcow2",
      "diskSize": 20480
    }
  ]
}

Hammr command is:

$ hammr template create --file test1.json
$ hammr template build --file test1.json

What is the simulation?

Thanks.

"hammr os list" returns empty result.

Hi,

"hammr os list" returns empty result.

# hammr os list
Getting distributions for [user] ...
No distributions available

But the user has available OSes.

uforge > user os list --account user
Getting user [user] ...
Success: User [user] can have access to the following operating systems in the default organization
+--------------------------------+-----------------+--------------+--------+---------+------------------+
| Distribution                   | Version         | Architecture | Access | Visible | Release Date     |
+--------------------------------+-----------------+--------------+--------+---------+------------------+
| CentOS                         | 5               | i386         |   X    |    X    | 2007-04-08       |
| CentOS                         | 5               | x86_64       |   X    |    X    | 2007-04-08       |
| CentOS                         | 6               | i386         |   X    |    X    | 2011-07-03       |
...

hammr version is '0.2.5.5', UForge is 3.5.1-20

Thanks.

hammr hangs silently when processing a template with 1000's of rpms as MySoftware.

I create a template to contain the 1000's of rpms needed to run cPanel for centos 6.

$ hammr template create -f --file template.json
Validating the template file [template.json] ...
OK: Syntax of template file [template.json] is ok
Downloadling file cpanel-perl-514-LWP-Protocol-https-6.03-1.cp1136.x86_64.rpm:
Status: 100% |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| Time: 0:00:00
Creating template from temporary [/tmp/hammr-13794/archive.tar.gz] archive ...
 10%|############ | 

The process never progresses past the 10% status.

Cannot install hammr because of a dependency error.

Hi,

Currently Hammr seems to have a dependency issue.
I could install hammr last week without issues, but now I cannot install it with the same procedure.

  • Hammr requires "texttable==0.8.1". But it seems like the repository does not provide the version anymore.
[root@localhost ~]# easy_install progressbar==2.3
...
Finished processing dependencies for progressbar==2.3

[root@localhost ~]# pip install hammr
Collecting hammr
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading hammr-0.2.5.7.tar.gz
Collecting uforge-python-sdk<3.6,>=3.5.1.3 (from hammr)
  Downloading uforge_python_sdk-3.5.1.3.tar.gz (178kB)
    100% |████████████████████████████████| 180kB 2.1MB/s
Collecting httplib2==0.9 (from hammr)
  Downloading httplib2-0.9.tar.gz (204kB)
    100% |████████████████████████████████| 204kB 1.6MB/s
Collecting cmd2==0.6.7 (from hammr)
  Downloading cmd2-0.6.7.tar.gz
Collecting texttable==0.8.1 (from hammr)
  Could not find a version that satisfies the requirement texttable==0.8.1 (from hammr) (from versions: 0.8.3, 0.8.4)
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external texttable to allow).
No matching distribution found for texttable==0.8.1 (from hammr)

[root@localhost ~]# pip install texttable==0.8.1
Collecting texttable==0.8.1
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement texttable==0.8.1 (from versions: 0.8.3, 0.8.4)
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external texttable to allow).
No matching distribution found for texttable==0.8.1
  • The latest texttable version is 0.8.4.
[root@localhost ~]# pip install texttable
Collecting texttable
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading texttable-0.8.4.tar.gz
Building wheels for collected packages: texttable
  Running setup.py bdist_wheel for texttable
  Stored in directory: /root/.cache/pip/wheels/ab/74/7f/2b7fc041492ad26d80779955f8fbc596c948f13e2dbb33bf6d
Successfully built texttable
Installing collected packages: texttable
Successfully installed texttable-0.8.4

Thanks.

Create bundle from directory

As today it's possible to create bundles from archives (*.rpm, *.deb, *.tar.gz, *.zip), it would be great to use a directory as bundle source. Example:
{
"name": "my-bundle-from-directory",
"version": "1.0",
"files": [
{
"name": "my-bundle",
"source": "overlay/etc",
"destination": "/etc"
}
]
}

As result, all the content of overlay/etc is copied to /etc in the build image.

some http errors exit hammr cli instead of retrying the command

I was doing a 'hammr template build' and I get this error (maybe due to network packet lost or something like this), and hammr does not retry the "get status" command:

Traceback (most recent call last):>>>>>>>>>>>>>>>>>>>>>>                                  | 62%: Installing distri... |                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  File "/usr/lib/python2.7/site-packages/hammr-0.2.5.9-py2.7.egg/hammr/commands/template/template.py", line 420, in do_build
    status = self.api.Users(self.login).Appliances(myAppliance.dbId).Images(rImage.dbId).Status.Get()
  File "build/bdist.linux-x86_64/egg/uforge/application.py", line 889, in Get
    return self._REST('/users/' + str(self._get('Uid')) + '/appliances/' + str(self._get('Aid')) + '/images/' + str(self._get('Itid')) + '/status', 'GET', body, **kwargs)
  File "build/bdist.linux-x86_64/egg/uforge/application.py", line 93, in _REST
    resp, content = obj._client.request(fullUrl, method.upper(), body = body, headers = requestHttpHeader)
  File "/usr/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1593, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1335, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1291, in _conn_request
    response = conn.getresponse()
  File "/usr/lib64/python2.7/httplib.py", line 1055, in getresponse
    raise ResponseNotReady()
ResponseNotReady

Providing a wrong UForge URL does not provide a nice error message

A HTTP 404 is returned when a bad URL is used (which is correct).

Though the error message is cryptic -- guessing that hammr is interpreting the body and not checking the http return code.

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/hammr/commands/template/template.py", line 500, in import_stack
{
    applianceImport = self.api.Users(self.login).Imports.Import(None, None, "true" if isImport else "false", "true" if isForce else "false")
  File "/Library/Python/2.7/site-packages/uforge/application.py", line 1745, in Import
    return self._REST('/users/' + str(self._get('Uid')) + '/imports', 'POST', body, **kwargs)
  File "/Library/Python/2.7/site-packages/uforge/application.py", line 95, in _REST
    raise Exception(_Objects.parseString(content, True))
  File "/Library/Python/2.7/site-packages/uforge/application.py", line 48, in parseString
    raise exception
XMLSyntaxError: Opening and ending tag mismatch: HR line 1 and body, line 1, column 934

No distribution available.

Hi,

Hammr returns "No distribution available" message, although I can find distributions with UForge Portal UI.

[root@localhost ~]# hammr os list --url https://factory.usharesoft.com:443/api -u user -p xxx
Getting distributions for [user] ...
No distributions available

Thanks.

"install native package"option is reset after importing my softwares with templates.

"Install this native package as part of the generation ?" option is reset to ON after importing my softwares with templates.
Hereunder is how to reproduce this issue.

  • Create a template which has a mysoftware a packages of which is rpm and install during generation option is OFF.
  • Export the template with Hammr.
  • Remove or rename original template and mysoftware and import the template.
  • The install option of the imported software is reset to ON.

"hammr scan run" fails when searching scan on uforge

Here's the error:

[root@webapp1 ~]# hammr -v
hammr version '0.2.5.8'
[root@webapp1 ~]# hammr scan run --ip 127.0.0.1 --scan-login root --name webapp1
INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.json
INFO: Using url https://uforge.usharesoft.com/api
Password for [email protected]:
... uforge-scan v2.55 (Nov 17 2015 16:25:44) (GIT Revision: 383245d)
... Distribution:        CentOS / 6.7 / i386
... Current System Name: Linux
...         Node Name:   webapp1
...         Release:     2.6.32-573.7.1.el6.i686
...         Version:     #1 SMP Tue Sep 22 19:05:58 UTC 2015
...         Machine:     i686
...         Domain:      (none)
... Server URL: https://uforge.usharesoft.com/api
... User: mikespub
... Testing connection to the service...
...                                     SUCCESS!
...
...
Searching scan on uforge ...
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/scan/scan.py", line 101, in do_run
    myScannedInstance = self.api.Users(self.login).Scannedinstances.Get(None, Includescans="true", Name=doArgs.name)
TypeError: Get() got multiple values for keyword argument 'Includescans'
[root@webapp1 ~]#

"hammr scan delete" deletes every scan if scan id and scan instance id is the same.

Hi,

"hammr scan delete" deletes every scans if the same scan id and scan instance id exist in a user.

For example, in the example below, id of scan instance "test9" and scan "test1 Scan #1" is the same (112)

hammr> scan list
Getting scans for [dev1] ...
+-----+-----------------------+--------+-----------------+
| Id  |         Name          | Status |  Distribution   |
+=====+=======================+========+=================+
| 104 | test1                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 112 |         test1 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 106 | test3                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 114 |         test3 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 115 |         test3 Scan #2 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 107 | test4                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 116 |         test4 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 108 | test5                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 117 |         test5 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 109 | test6                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 118 |         test6 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 110 | test7                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 119 |         test7 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 111 | test8                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 120 |         test8 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+
| 112 | test9                 |        | CentOS 6 x86_64 |
+-----+-----------------------+--------+-----------------+
| 121 |         test9 Scan #1 | Done   |                 |
+-----+-----------------------+--------+-----------------+

Found 8 scans

Delete scan with id 112. An exception was returned.

hammr> scan delete --id 112
Searching scan with id [112] ...
+-----+-------+--------+-----------------+
| Id  | Name  | Status |  Distribution   |
+=====+=======+========+=================+
| 112 | test9 |        | CentOS 6 x86_64 |
+-----+-------+--------+-----------------+

Do you really want to delete scan with id 112 [Y/n]
Y
Please wait...
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/scan/scan.py", line 430, in do_delete
    self.api.Users(self.login).Scannedinstances(doArgs.id).Delete()
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 2232, in Delete
    return self._REST('/users/' + str(self._get('Uid')) + '/scannedinstances', 'DELETE', body, **kwargs)
  File "/usr/lib/python2.6/site-packages/uforge/application.py", line 93, in _REST
    resp, content = obj._client.request(fullUrl, method.upper(), body = body, headers = requestHttpHeader)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1593, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1335, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.6/site-packages/httplib2/__init__.py", line 1291, in _conn_request
    response = conn.getresponse()
  File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
    response.begin()
  File "/usr/lib64/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status
    line = self.fp.readline()
  File "/usr/lib64/python2.6/socket.py", line 433, in readline
    data = recv(1)
  File "/usr/lib64/python2.6/ssl.py", line 215, in recv
    return self.read(buflen)
  File "/usr/lib64/python2.6/ssl.py", line 136, in read
    return self._sslobj.read(len)
SSLError: The read operation timed out
None

No scans exist after launching the "hammr scan delete" command.
Every scans are deleted.

hammr> scan list
Getting scans for [dev1] ...
No scans available

Thanks

"hammr image publish" returns exception if there is no cloud account.

Hi,

"hammr image publish" command returns exception if there is no cloud account registered.

  • command result:
[root@hammr-351 templates]# hammr image publish --file fj3.json
INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.json
INFO: Using url https://myforge/api
Validating the template file [fj3.json] ...
OK: Syntax of template file [fj3.json] is ok
Publishing 'openstack-qcow2' image (1/1)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/hammr/commands/image/image.py", line 147, in do_publish
    rCode = self.publish_builder(builder, template, appliance, rInstallProfile, i, None)
  File "/usr/lib/python2.6/site-packages/hammr/commands/image/image.py", line 391, in publish_builder
    if accounts is None or not accounts.get_credAccount():
AttributeError: 'str' object has no attribute 'get_credAccount'
  • config json:
...
  "builders": [
    {
      "type": "openstack-qcow2",
      "account": {
        "type": "openstack",
        "name": "myaccount"
      },
      "tenant": "dev",
      "imageName": "myTemplate",
      "description": "OpenStack pub test"
    }
  ]
}
  • Hammr returns an appropriate message if there is any account.
[root@hammr-351 templates]# hammr image publish --file fj3.json
INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /root/.hammr/credentials.json
INFO: Using url https://myforge/api
Validating the template file [fj3.json] ...
OK: Syntax of template file [fj3.json] is ok
Publishing 'openstack-qcow2' image (1/1)
ERROR: No accounts available with name myaccount

Thanks.

Flag acceptAutoSigned not working for image download

Even after setting the flag "acceptAutoSigned" as true in the credentials file, Hammr fails to download an image.
Version: 0.2.5.9

Command:
hammr image download --id 1095 --file image.tar.gz

Output:

INFO: no username nor password provided on command line, trying credentials file
INFO: Using credentials file: /home/elias/.hammr/credentials.json
INFO: Using url https://10.1.2.151/api
Searching image with id [1095] ...
ERROR: downloading https://10.1.2.151/api/users/elias/appliances/747/images/1095/downloads/uss-dev-env_1.0rev1_targz.tar.gz?downloadId=e662d401bd7313b9db1fa9d50ce3b85f: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Work arround: use http instead of https.

RFE: allow to pass a ssh pub key for authentication for hammr scan

If root login with password is not allowed on the machine to be scanned, but login is through keys only, it would be good to be able to pass as argument the identity file containing the key.

For example, similarly to the ssh syntax, the extra argument for hammr scan could be:
--identity_file ".ssh/myId.pem"

CMDs are completely broken - only help is displayed

Unfortunately the command handling seems to be completely broken. I've installed it via pip and from a trunk checkout and whatever command I use the help will be display.

e.g
$ hammr os list
usage: hammr [-a URL] [-u USER] [-p PASSWORD] [-v] [-h] [cmds [cmds ...]]

commands:
Available hammr commands

Verified at Ubuntu 12.04 and Debian Wheezy.

$ hammr -v
hammr version '0.2.3'

"hammr scan" never starts.

Hi,

"hammr scan" command never starts scan. Stopped at "Searching scan on uforge ..." and never proceed.

[root@hammr-351 ~]# hammr scan run --ip 192.168.56.104 --scan-login root --name hmrscan
Password for [email protected]:
Searching scan on uforge ...

Glassfish receives "scannedInstances_get" request repeatedly until the scan was cancelled.

Thanks.

Empty password for root user is not working

Using a empty password (that covers the options "Admin password = none") leads to an error.

Steps to reproduce
Try to deploy the following template:

{

  "stack": {

    "name": "Centos7MininalNonePass",

    "version": "1.0",

    "os": {

      "name": "CentOS",

      "version": "7",

      "arch": "x86_64",

      "profile": "Minimal",

      "pkgs": [

        {

          "name": "nginx"

        }

      ]

    },

    "installation": {

      "diskSize": 12288,
      "rootUser": {
        "password": "",
        "setPassword": true
      }

    }

  },
  "builders": [
    {
      "type": "VirtualBox",
      "hardwareSettings": {
        "memory": 512
      }
    }
  ]

}

The following error will be displayed:

Validating the template file [NonePassMinimalCentOS.json] ...
OK: Syntax of template file [NonePassMinimalCentOS.json] is ok
Creating template from temporary [/tmp/hammr-18678/archive.tar.gz] archive ...
100%|###############################################################################################################|
ERROR: Template create: A root user does not have the mandatory attribute password declared

Exit status of Hammr command.

Hi,

Hammr returns exit status 0 despite the command result is an error.
For example, exporting template. Hammr returns an error message. But the exit status is "0".

[root@hammr-351 ~]# hammr template export --id 99999999
Exporting template with id [99999999] :
ERROR: UForge Error '404' with method: GET http://192.168.2.62:9090/ufws-3.3/users/k_takahashi/appliances/99999999
Message:
        Appliance with id [99,999,999] not found.
[root@hammr-351 ~]# echo $?
0

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.