UI: Update Template

This patch follows updating templates API based-on patchset:

    [PATCH V7 0/5] add a update method for template

to replace the way we worked around it in previous code.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Edit Template API: Change HTTP Code to 303

With 301, Firefox will pop up a confirm window:

  This web page is being redirected to a new location. Would you
  like to resend the form data you have typed to the new location?

                                                 Cancel     OK

to let user resend the new template data to the new URI, which I
think is unnecessary. Changing 301 to 303 will avoid this problem.

    Other browsers work well with 301.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Update Test Code

Update test code for change from 301 to 303.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
screenshot: Expose stream test result

The screenshot test verify if the libvirt stream functionality is working
properly while creating the screenshot image. The result will be expose as host
capabilities because that it must be accessible.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Capabilities detection

Expose host capabilities:
 - which network protocols are accepted for iso streaming
 - if libvirt stream functionality can create screenshot file without problems
   or not

Those information can be accessed by GET /config/capabilities.

The JSON will be like:

    {'stream_protocols': [<protocols>],
     'screenshot': <None|True|False>}

None value for 'screenshot' indicates the libvirt stream test was not completed
yet.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
capabilities: Update API.md

Add Capabilities Resource documentation to API.md.
This resource expose host capabilities.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
capabilities: Update REST API tests

Add new test to verify host capabilities.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Add a go to homepage button at the error page

Summary:
After added the login page.
If the user input a invalid page with # tag.The page will redirect
to a error page with a gohome button.
But there is not a go home page at the error page.
So add it. To keep consistent.
Signed-off-by: zhoumeina <zhoumeina@oc5550100378.ibm.com>
Aggregate read for iso to improve scan efficiency

Multiple read during scanning can be time consuming,
aggregate them into reading for two times to improve the time for scan.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>