⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
Hammer CLI
All Projects
Hammer CLI
Overview
Activity
Roadmap
Issues
Wiki
Repository
Download (4.97 KB)
Bug #26926
» 26926_hammer_api_curl_build.txt
output by toggling build status via curl/API -
Will Foster
, 05/31/2019 03:52 PM
[root@foreman ~]# curl -vvv -X PUT -s -k -u admin:XXXXXXXXXXXX -H "Accept: application/json" -H "Content-Type: application/json" -d '{ "host" : { "build" : "true" } }' https://`hostname`/api/v2/hosts/480
* About to connect() to foreman.rdu2.scalelab.redhat.com port 443 (#0)
* Trying 10.1.32.3...
* Connected to foreman.rdu2.scalelab.redhat.com (10.1.32.3) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* NSS: client certificate not found (nickname not specified)
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=foreman.rdu2.scalelab.redhat.com
* start date: Oct 02 15:15:27 2018 GMT
* expire date: Oct 02 15:15:27 2023 GMT
* common name: foreman.rdu2.scalelab.redhat.com
* issuer: CN=Puppet CA: foreman.rdu2.scalelab.redhat.com
* Server auth using Basic with user 'admin'
> PUT /api/v2/hosts/480 HTTP/1.1
> Authorization: Basic YWRtaW46b1NCSlQ4Y2pxaE5HbnEyWQ==
> User-Agent: curl/7.29.0
> Host: foreman.rdu2.scalelab.redhat.com
> Accept: application/json
> Content-Type: application/json
> Content-Length: 33
>
* upload completely sent off: 33 out of 33 bytes
< HTTP/1.1 200 OK
< Date: Fri, 31 May 2019 15:47:30 GMT
< Server: Apache/2.4.6 (CentOS)
< Foreman_version: 1.19.1
< Foreman_api_version: 2
< Apipie-Checksum: 168c3600e744d9af1db2f53be93f02db2a338009
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 8a4b2f61-3b49-4ade-b799-12687621312f
< X-Runtime: 1.148231
< Content-Security-Policy: default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'
< Strict-Transport-Security: max-age=631139040; includeSubdomains
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: sameorigin
< X-Permitted-Cross-Domain-Policies: none
< X-XSS-Protection: 1; mode=block
< X-Powered-By: Phusion Passenger 4.0.53
< Set-Cookie: request_method=PUT; path=/; secure; HttpOnly; SameSite=Lax
< Set-Cookie: _session_id=aa0be005603e87bcfdc02fdf3765ae2f; path=/; secure; HttpOnly; SameSite=Lax
< ETag: W/"9d09911cc9efe8ac0196cf148cb4dc61"
< Status: 200 OK
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: application/json; charset=utf-8
<
{"ip":"10.1.42.202","ip6":"","environment_id":1,"environment_name":"production","last_report":null,"mac":"b8:ca:3a:63:87:b0","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"rdu2.scalelab.redhat.com","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":2,"operatingsystem_name":"RHEL 7","subnet_id":4,"subnet_name":"rdu2_mgmt3","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":107,"ptable_name":"generic-rhel7","medium_id":11,"medium_name":"RHEL Local","pxe_loader":"PXELinux BIOS","build":true,"comment":"","disk":"","installed_at":null,"model_id":null,"hostgroup_id":2,"owner_id":4,"owner_name":"Admin User","owner_type":"User","enabled":true,"managed":true,"use_image":null,"image_file":"","uuid":null,"compute_resource_id":null,"compute_resource_name":null,"compute_profile_id":null,"compute_profile_name":null,"capabilities":["build"],"provision_method":"build","certname":"f21-h18-000-r620.rdu2.scalelab.redhat.com","image_id":null,"image_name":null,"created_at":"2019-03-12 18:58:02 UTC","updated_at":"2019-05-31 15:47:31 UTC","last_compile":null,"global_status":0,"global_status_label":"OK","puppet_status":0,"model_name":null,"build_status":1,"build_status_label":"Pending installation","name":"f21-h18-000-r620.rdu2.scalelab.redhat.com","id":480,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"hostgroup_name":"Production","hostgroup_title":"Production","parameters":[{"priority":70,"created_at":"2019-05-31 15:33:50 UTC","updated_at":"2019-05-31 15:33:50 UTC","id":1169,"name":"broken_state","value":"true"}],"all_parameters":[{"priority":70,"created_at":"2019-05-31 15:33:50 UTC","updated_at":"2019-05-31 15:33:50 UTC","id":1169,"name":"broken_state","value":"true"}],"interfaces":[{"id":830,"name":"f21-h18-000-r620.rdu2.scalelab.redhat.com","ip":"10.1.42.202","ip6":"","mac":"b8:ca:3a:63:87:b0","mtu":1500,"fqdn":"f21-h18-000-r620.rdu2.scalel* Connection #0 to host foreman.rdu2.scalelab.redhat.com left intact
ab.redhat.com","identifier":"em1","primary":true,"provision":true,"type":"interface"},{"id":831,"name":"mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com","ip":"10.1.42.49","ip6":"","mac":"e0:db:55:12:db:06","mtu":1500,"fqdn":"mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com","identifier":"mgmt","primary":false,"provision":false,"type":"interface"}],"puppetclasses":[],"config_groups":[],"all_puppetclasses":[],"permissions":{"view_hosts":true,"create_hosts":true,"edit_hosts":true,"destroy_hosts":true,"build_hosts":true,"power_hosts":true,"console_hosts":true,"ipmi_boot_hosts":true,"puppe
trun_hosts":true}}
« Previous
1
2
Next »
(2-2/2)
Loading...