• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

01org / ciao / 296
66%

Build:
DEFAULT BRANCH: master
Ran 21 Nov 2016 03:18PM UTC
Jobs 2
Files 89
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
296

push

travis-ci

markdryan
ciao-cli: Improve template functionality

This PR adds two new functions to the template language understood
by ciao-cli:

- tojson outputs the specified object in json format, e.g., {{tojson .}}
- filter operates on an slice or array of structures.  It allows the caller
  to filter the input array based on the value of a single field.
  The function returns a slice containing only the objects that satisfy the
  filter, e.g.

  ciao-cli image list -f '{{$x := filter . "Protected" "true"}}{{len $x}}'

  outputs the number of protected images maintained by the image service.
- select operates on a slice of structs.  It outputs the value of a specified
  field for each struct on a new line , e.g.,
  {{select . "Name"}}

The image list command was also modified to called the template utility
functions in template.go.  This was necessary to ensure that our new
functions are available to the image list command.

The help documentation for commands that accept templates has been updated
to provide a descriptions for the new functions.

Finally, a the createTemplate function was using the wrong name for the
templates it created.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>

12018 of 18517 relevant lines covered (64.9%)

1.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 296.1 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 21 Nov 2016 03:18PM UTC 0
64.9
Travis Job 296.1
2 296.2 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 21 Nov 2016 03:20PM UTC 0
64.82
Travis Job 296.2
Source Files on build 296
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #296
  • 6c254bcb on github
  • Prev Build on master (#295)
  • Next Build on master (#297)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc