Problem:
hammer does not update vmware interfaces:
What docs states:
Usage:
hammer compute-profile values update-interface [OPTIONS]
Options:
--compute-profile COMPUTE_PROFILE_NAME Compute profile name
--compute-profile-id COMPUTE_PROFILE_ID
--compute-resource COMPUTE_RESOURCE_NAME Compute resource name
--compute-resource-id COMPUTE_RESOURCE_ID
--interface SET_VALUES Interface parameters, should be comma separated list of values
Comma-separated list of key=value.
JSON is acceptable and preferred way for complex parameters
--interface-id INTERFACE_ID Interface id
--location LOCATION_NAME Location name
--location-id LOCATION_ID
--location-title LOCATION_TITLE Location title
--organization ORGANIZATION_NAME Organization name
--organization-id ORGANIZATION_ID
--organization-title ORGANIZATION_TITLE Organization title
-h, --help Print help
Provider specific options:
vmware:
--interface:
compute_type Type of the network adapter, for example one of:
VirtualVmxnet3,
VirtualE1000
See documentation center for your version of vSphere to find more details about available adapter types:
https://www.vmware.com/support/pubs/
compute_network Network ID from VMware
what i tried:
hammer compute-profile values create --interface compute_type=VirtualVmxnet3,compute_network=dvportgroup-108778
hammer compute-profile values (update/create)-interface --interface compute_type=VirtualVmxnet3,compute_network=dvportgroup-108778
hammer compute-profile values update-interface --compute-profile "Normal WEB-Prod Box" --compute-resource "VCenter ORGANIZATION" --interface-id 0 --interface compute_type=VirtualVmxnet3,compute_network=dvportgroup-108778
hammer compute-profile values update-interface --compute-profile "Normal WEB-Prod Box" --compute-resource "VCenter ORGANIZATION" --interface-id 0 --interface compute_type="VMXNET 3",compute_network="dvPortGroup-207-for-future-use"
hammer compute-profile values update-interface --compute-profile "Normal WEB-Prod Box" --compute-resource "VCenter ORGANIZATION" --interface-id 0 --interface type_name="VMXNET 3",network_name="dvPortGroup-207-for-future-use"
hammer compute-profile values update-interface --compute-profile "Normal WEB-Prod Box" --compute-resource "VCenter ORGANIZATION" --interface-id 0 --interface type_id=VirtualVmxnet3,network_id=dvportgroup-108778
Actual Outcome:
Interface was updated.
set:
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
got:
"interfaces_attributes" => {
"0" => {
"type_id" => nil,
"type_name" => nil,
"network_id" => nil,
"network_name" => nil
}
}
Expected outcome:
Interface was updated.
set:
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
got:
"interfaces_attributes" => {
"0" => {
"type_id" => "VirtualVmxnet3",
"type_name" => "VMXNET 3",
"network_id" => "dvportgroup-108778",
"network_name" => "dvPortGroup-207-for-future-use"
}
}
Foreman and Proxy versions:
1.22.1 - 1.23
Solution:
docs are wrong use:
hammer -d compute-profile values update-interface --compute-profile "Normal WEB-Prod Box" --compute-resource "VCenter ORGANIZATION" --interface-id 0 --interface type=VirtualVmxnet3,network=dvportgroup-108778
its type and network not compute_type and compute_network
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Initialization of Hammer CLI (0.17.1) has started...
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Running at ruby 2.5.5-p157
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Configuration from the file /etc/hammer/cli.modules.d/foreman_templates.yml has been loaded
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Configuration from the file /home/erami/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mSSLoptionse[0m] SSL options: {
:verify_ssl => true
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Follow redirects: never
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mConnectione[0m] Registered: foreman
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mModulese[0m] Extension module hammer_cli_foreman (0.17.0) loaded.
[e[33m WARNe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLIForemanTemplates::ImportCommande[0m] Resource 'template' does not exist in the API
[e[33m WARNe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLIForemanTemplates::ExportCommande[0m] Resource 'template' does not exist in the API
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mModulese[0m] Extension module hammer_cli_foreman_templates (0.1.2) loaded.
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] Using locale 'en'
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/locale'
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mInite[0m] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/locale'
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLI::MainCommande[0m] Called with options: {"option_debug"=>true}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLIForeman::ComputeProfilee[0m] Called with options: {}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLIForeman::ComputeAttributee[0m] Called with options: {}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Server: https://foreman.organizaation.at
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] GET /api/compute_profiles
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Params: {
:search => "name = \"Normal WEB-Prod Box\""
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Headers: {
:params => {
:search => "name = \"Normal WEB-Prod Box\""
}
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response: {
"total" => 5,
"subtotal" => 1,
"page" => 1,
"per_page" => 20,
"search" => "name = \"Normal WEB-Prod Box\"",
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"created_at" => "2019-09-17T15:00:06.566Z",
"updated_at" => "2019-09-17T15:00:06.566Z",
"id" => 6,
"name" => "Normal WEB-Prod Box"
}
]
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response headers: {
:foreman_version => "1.22.1",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f",
:etag => "W/\"71869baff111ce615674a0ffb63492dd\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "883d6f00-c110-4544-8b49-f2fe64ba8e95",
:x_runtime => "0.040167",
:strict_transport_security => "max-age=631139040; includeSubdomains",
:x_frame_options => "sameorigin",
:x_content_type_options => "nosniff",
:x_xss_protection => "1; mode=block",
:x_download_options => "noopen",
:x_permitted_cross_domain_policies => "none",
: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'",
:server => "WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29)",
:date => "Wed, 18 Sep 2019 13:47:04 GMT",
:content_length => "296",
:set_cookie => [
[0] "_session_id=dc32da5e170ce2ba702db78f90f488f4; path=/; HttpOnly; secure; SameSite=Lax"
]
}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Server: https://foreman.organizaation.at
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] GET /api/compute_resources
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Params: {
:search => "name = \"VCenter organization\""
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Headers: {
:params => {
:search => "name = \"VCenter organization\""
}
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response: {
"total" => 1,
"subtotal" => 1,
"page" => 1,
"per_page" => 20,
"search" => "name = \"VCenter organization\"",
"sort" => {
"by" => nil,
"order" => nil
},
"results" => [
[0] {
"description" => "productive VMWare Datacenter",
"url" => "WX63V-VCTR-P1.organizaation.at",
"created_at" => "2019-09-13T13:11:22.951Z",
"updated_at" => "2019-09-13T13:11:22.951Z",
"id" => 1,
"name" => "VCenter organization",
"provider" => "Vmware",
"provider_friendly_name" => "VMware",
"user" => "svc_user",
"datacenter" => "organization Net 2.x",
"server" => "WX63V-VCTR-P1.organizaation.at",
"set_console_password" => true,
"caching_enabled" => true,
"display_type" => "vmrc"
}
]
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response headers: {
:foreman_version => "1.22.1",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f",
:etag => "W/\"2c41645b13d3f7e7e09581781b06f2ca\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "31a7140c-f75c-42eb-a13a-e353ca230c6a",
:x_runtime => "0.036257",
:strict_transport_security => "max-age=631139040; includeSubdomains",
:x_frame_options => "sameorigin",
:x_content_type_options => "nosniff",
:x_xss_protection => "1; mode=block",
:x_download_options => "noopen",
:x_permitted_cross_domain_policies => "none",
: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'",
:server => "WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29)",
:date => "Wed, 18 Sep 2019 13:47:04 GMT",
:content_length => "576",
:set_cookie => [
[0] "_session_id=d86125892789972f9f5875840296bf8f; path=/; HttpOnly; secure; SameSite=Lax"
]
}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mHammerCLIForeman::ComputeAttribute::UpdateInterfacee[0m] Called with options: {"option_interface"=>{"compute_type"=>"VirtualVmxnet3", "compute_network"=>"dvportgroup-108778"}, "option_interface_id"=>0, "option_compute_profile_name"=>"Normal WEB-Prod Box", "option_compute_profile_id"=>6, "option_compute_resource_name"=>"VCenter organization", "option_compute_resource_id"=>1}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Server: https://foreman.organizaation.at
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] GET /api/compute_profiles/6
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Params: {}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Headers: {
:params => {}
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response: {
"created_at" => "2019-09-17T15:00:06.566Z",
"updated_at" => "2019-09-17T15:00:06.566Z",
"id" => 6,
"name" => "Normal WEB-Prod Box",
"compute_attributes" => [
[0] {
"id" => 3,
"name" => "1 CPUs and 2048 MB memory",
"compute_resource_id" => 1,
"compute_resource_name" => "VCenter organization",
"provider_friendly_name" => "VMware",
"compute_profile_id" => 6,
"compute_profile_name" => "Normal WEB-Prod Box",
"vm_attrs" => {
"cpus" => "1",
"scsi_controller_type" => "ParaVirtualSCSIController",
"memory_mb" => "2048",
"firmware" => "bios",
"cluster" => "PROD LX L1TF",
"resource_pool" => "Resources",
"path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"guest_id" => "ubuntu64Guest",
"hardware_version" => "vmx-13",
"cpuHotAddEnabled" => "1",
"memoryHotAddEnabled" => "1",
"volumes_attributes" => {
"0" => {
"datastore" => "prod_nas_gold_lx_webserver_nfs4",
"size_gb" => "20 GB",
"thin" => "True",
"eager_zero" => "False",
"mode" => "persistent"
}
},
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
},
"attributes" => {
"cpus" => "1",
"firmware" => "bios",
"guest_id" => "ubuntu64Guest",
"annotation" => nil,
"resource_pool_id" => "resgroup-1353526",
"image_id" => nil,
"cores_per_socket" => nil,
"memory" => 2097152,
"folder_path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"folder_name" => "WEB-Prod-207",
"cluster_id" => "domain-c1353525",
"cluster_name" => "PROD LX L1TF",
"resource_pool_name" => "Resources",
"guest_name" => "Ubuntu Linux (64-bit)",
"hardware_version_id" => "vmx-13",
"hardware_version_name" => "13 (ESXi 6.5)",
"memory_hot_add_enabled" => true,
"cpu_hot_add_enabled" => true,
"add_cdrom" => nil,
"image_name" => nil,
"scsi_controllers" => {},
"volumes_attributes" => {
"0" => {
"name" => nil,
"mode" => "persistent",
"controller_key" => nil,
"thin" => true,
"size" => "21474836480",
"datastore_name" => "prod_nas_gold_lx_webserver_nfs4",
"datastore_id" => "datastore-1910279"
}
},
"interfaces_attributes" => {
"0" => {
"type_id" => nil,
"type_name" => nil,
"network_id" => nil,
"network_name" => nil
}
}
}
}
]
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response headers: {
:foreman_version => "1.22.1",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f",
:etag => "W/\"f94b77a27c11068bff560ac758a02e86\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "ae2f55e8-7b96-4434-92c0-cecc9838c3b0",
:x_runtime => "0.049149",
:strict_transport_security => "max-age=631139040; includeSubdomains",
:x_frame_options => "sameorigin",
:x_content_type_options => "nosniff",
:x_xss_protection => "1; mode=block",
:x_download_options => "noopen",
:x_permitted_cross_domain_policies => "none",
: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'",
:server => "WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29)",
:date => "Wed, 18 Sep 2019 13:47:04 GMT",
:content_length => "1817",
:set_cookie => [
[0] "_session_id=d7128b9e979d4a975235ca509a359523; path=/; HttpOnly; secure; SameSite=Lax"
]
}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Server: https://foreman.organizaation.at
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] GET /api/compute_resources/1
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Params: {}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Headers: {
:params => {}
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response: {
"description" => "productive VMWare Datacenter",
"url" => "WX63V-VCTR-P1.organizaation.at",
"created_at" => "2019-09-13T13:11:22.951Z",
"updated_at" => "2019-09-13T13:11:22.951Z",
"id" => 1,
"name" => "VCenter organization",
"provider" => "Vmware",
"provider_friendly_name" => "VMware",
"user" => "svc_user",
"datacenter" => "organization Net 2.x",
"server" => "WX63V-VCTR-P1.organizaation.at",
"set_console_password" => true,
"caching_enabled" => true,
"display_type" => "vmrc",
"images" => [],
"compute_attributes" => [
[0] {
"id" => 3,
"name" => "1 CPUs and 2048 MB memory",
"compute_resource_id" => 1,
"compute_resource_name" => "VCenter organization",
"provider_friendly_name" => "VMware",
"compute_profile_id" => 6,
"compute_profile_name" => "Normal WEB-Prod Box",
"vm_attrs" => {
"cpus" => "1",
"scsi_controller_type" => "ParaVirtualSCSIController",
"memory_mb" => "2048",
"firmware" => "bios",
"cluster" => "PROD LX L1TF",
"resource_pool" => "Resources",
"path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"guest_id" => "ubuntu64Guest",
"hardware_version" => "vmx-13",
"cpuHotAddEnabled" => "1",
"memoryHotAddEnabled" => "1",
"volumes_attributes" => {
"0" => {
"datastore" => "prod_nas_gold_lx_webserver_nfs4",
"size_gb" => "20 GB",
"thin" => "True",
"eager_zero" => "False",
"mode" => "persistent"
}
},
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
},
"attributes" => {
"cpus" => "1",
"firmware" => "bios",
"guest_id" => "ubuntu64Guest",
"annotation" => nil,
"resource_pool_id" => "resgroup-1353526",
"image_id" => nil,
"cores_per_socket" => nil,
"memory" => 2097152,
"folder_path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"folder_name" => "WEB-Prod-207",
"cluster_id" => "domain-c1353525",
"cluster_name" => "PROD LX L1TF",
"resource_pool_name" => "Resources",
"guest_name" => "Ubuntu Linux (64-bit)",
"hardware_version_id" => "vmx-13",
"hardware_version_name" => "13 (ESXi 6.5)",
"memory_hot_add_enabled" => true,
"cpu_hot_add_enabled" => true,
"add_cdrom" => nil,
"image_name" => nil,
"scsi_controllers" => {},
"volumes_attributes" => {
"0" => {
"name" => nil,
"mode" => "persistent",
"controller_key" => nil,
"thin" => true,
"size" => "21474836480",
"datastore_name" => "prod_nas_gold_lx_webserver_nfs4",
"datastore_id" => "datastore-1910279"
}
},
"interfaces_attributes" => {
"0" => {
"type_id" => nil,
"type_name" => nil,
"network_id" => nil,
"network_name" => nil
}
}
}
},
[1] {
"id" => 2,
"name" => "1 CPUs and 2048 MB memory",
"compute_resource_id" => 1,
"compute_resource_name" => "VCenter organization",
"provider_friendly_name" => "VMware",
"compute_profile_id" => 5,
"compute_profile_name" => "Normal IHS-Prod Box",
"vm_attrs" => {
"cpus" => "1",
"scsi_controller_type" => "ParaVirtualSCSIController",
"memory_mb" => "2048",
"firmware" => "bios",
"cluster" => "PROD LX L1TF",
"resource_pool" => "Resources",
"path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"guest_id" => "ubuntu64Guest",
"hardware_version" => "vmx-13",
"cpuHotAddEnabled" => "1",
"memoryHotAddEnabled" => "1",
"volumes_attributes" => {
"0" => {
"datastore" => "prod_nas_gold_lx_appserver_nfs4",
"size_gb" => "20 GB",
"thin" => "True",
"eager_zero" => "False",
"mode" => "persistent"
}
},
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
},
"attributes" => {
"cpus" => "1",
"firmware" => "bios",
"guest_id" => "ubuntu64Guest",
"annotation" => nil,
"resource_pool_id" => "resgroup-1353526",
"image_id" => nil,
"cores_per_socket" => nil,
"memory" => 2097152,
"folder_path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"folder_name" => "WEB-Prod-207",
"cluster_id" => "domain-c1353525",
"cluster_name" => "PROD LX L1TF",
"resource_pool_name" => "Resources",
"guest_name" => "Ubuntu Linux (64-bit)",
"hardware_version_id" => "vmx-13",
"hardware_version_name" => "13 (ESXi 6.5)",
"memory_hot_add_enabled" => true,
"cpu_hot_add_enabled" => true,
"add_cdrom" => nil,
"image_name" => nil,
"scsi_controllers" => {},
"volumes_attributes" => {
"0" => {
"name" => nil,
"mode" => "persistent",
"controller_key" => nil,
"thin" => true,
"size" => "21474836480",
"datastore_name" => "prod_nas_gold_lx_appserver_nfs4",
"datastore_id" => "datastore-1910278"
}
},
"interfaces_attributes" => {
"0" => {
"type_id" => nil,
"type_name" => nil,
"network_id" => nil,
"network_name" => nil
}
}
}
}
],
"locations" => [
[0] {
"id" => 2,
"name" => "global",
"title" => "global",
"description" => "global zone for organization core production linux services"
}
],
"organizations" => [
[0] {
"id" => 1,
"name" => "organization",
"title" => "organization",
"description" => "This is the organization"
}
]
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Response headers: {
:foreman_version => "1.22.1",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f",
:etag => "W/\"fbf4f07ddc571fc05af6817264375515\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "20a4d4dd-d587-45d2-a555-6298ce296556",
:x_runtime => "0.075443",
:strict_transport_security => "max-age=631139040; includeSubdomains",
:x_frame_options => "sameorigin",
:x_content_type_options => "nosniff",
:x_xss_protection => "1; mode=block",
:x_download_options => "noopen",
:x_permitted_cross_domain_policies => "none",
: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'",
:server => "WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29)",
:date => "Wed, 18 Sep 2019 13:47:04 GMT",
:content_length => "4012",
:set_cookie => [
[0] "_session_id=8238874810956f0901918daad052cbfd; path=/; HttpOnly; secure; SameSite=Lax"
]
}
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Server: https://foreman.organizaation.at
[e[32m INFOe[0m e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] PUT /api/compute_attributes/3
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Params: {
"compute_attribute" => {
"id" => 3,
"name" => "1 CPUs and 2048 MB memory",
"compute_resource_id" => 1,
"compute_resource_name" => "VCenter organization",
"provider_friendly_name" => "VMware",
"compute_profile_id" => 6,
"compute_profile_name" => "Normal WEB-Prod Box",
"vm_attrs" => {
"cpus" => "1",
"scsi_controller_type" => "ParaVirtualSCSIController",
"memory_mb" => "2048",
"firmware" => "bios",
"cluster" => "PROD LX L1TF",
"resource_pool" => "Resources",
"path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"guest_id" => "ubuntu64Guest",
"hardware_version" => "vmx-13",
"cpuHotAddEnabled" => "1",
"memoryHotAddEnabled" => "1",
"volumes_attributes" => {
"0" => {
"datastore" => "prod_nas_gold_lx_webserver_nfs4",
"size_gb" => "20 GB",
"thin" => "True",
"eager_zero" => "False",
"mode" => "persistent"
}
},
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
},
0 => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
}
}
}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Headers: {}
[DEBUG e[34m2019-09-18T15:47:04e[0m e[36mAPIe[0m] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG e[34m2019-09-18T15:47:05e[0m e[36mAPIe[0m] Response: {
"created_at" => "2019-09-17T15:00:10.134Z",
"updated_at" => "2019-09-18T13:45:48.284Z",
"id" => 3,
"name" => "1 CPUs and 2048 MB memory",
"compute_resource_id" => 1,
"compute_resource_name" => "VCenter organization",
"provider_friendly_name" => "VMware",
"compute_profile_id" => 6,
"compute_profile_name" => "Normal WEB-Prod Box",
"vm_attrs" => {
"cpus" => "1",
"scsi_controller_type" => "ParaVirtualSCSIController",
"memory_mb" => "2048",
"firmware" => "bios",
"cluster" => "PROD LX L1TF",
"resource_pool" => "Resources",
"path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"guest_id" => "ubuntu64Guest",
"hardware_version" => "vmx-13",
"cpuHotAddEnabled" => "1",
"memoryHotAddEnabled" => "1",
"volumes_attributes" => {
"0" => {
"datastore" => "prod_nas_gold_lx_webserver_nfs4",
"size_gb" => "20 GB",
"thin" => "True",
"eager_zero" => "False",
"mode" => "persistent"
}
},
"interfaces_attributes" => {
"0" => {
"compute_type" => "VirtualVmxnet3",
"compute_network" => "dvportgroup-108778"
}
}
},
"attributes" => {
"cpus" => "1",
"firmware" => "bios",
"guest_id" => "ubuntu64Guest",
"annotation" => nil,
"resource_pool_id" => "resgroup-1353526",
"image_id" => nil,
"cores_per_socket" => nil,
"memory" => 2097152,
"folder_path" => "/Datencenter/organization Net 2.x/vm/WEB-Prod-207",
"folder_name" => "WEB-Prod-207",
"cluster_id" => "domain-c1353525",
"cluster_name" => "PROD LX L1TF",
"resource_pool_name" => "Resources",
"guest_name" => "Ubuntu Linux (64-bit)",
"hardware_version_id" => "vmx-13",
"hardware_version_name" => "13 (ESXi 6.5)",
"memory_hot_add_enabled" => true,
"cpu_hot_add_enabled" => true,
"add_cdrom" => nil,
"image_name" => nil,
"scsi_controllers" => {},
"volumes_attributes" => {
"0" => {
"name" => nil,
"mode" => "persistent",
"controller_key" => nil,
"thin" => true,
"size" => "21474836480",
"datastore_name" => "prod_nas_gold_lx_webserver_nfs4",
"datastore_id" => "datastore-1910279"
}
},
"interfaces_attributes" => {
"0" => {
"type_id" => nil,
"type_name" => nil,
"network_id" => nil,
"network_name" => nil
}
}
}
}
[DEBUG e[34m2019-09-18T15:47:05e[0m e[36mAPIe[0m] Response headers: {
:foreman_version => "1.22.1",
:foreman_api_version => "2",
:content_type => "application/json; charset=utf-8",
:apipie_checksum => "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f",
:etag => "W/\"bca4943bfbdba27a764292afc8e95dc4\"",
:cache_control => "max-age=0, private, must-revalidate",
:x_request_id => "920bfc96-e94d-40d9-8756-4a73f225c1b0",
:x_runtime => "0.144002",
:strict_transport_security => "max-age=631139040; includeSubdomains",
:x_frame_options => "sameorigin",
:x_content_type_options => "nosniff",
:x_xss_protection => "1; mode=block",
:x_download_options => "noopen",
:x_permitted_cross_domain_policies => "none",
: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'",
:server => "WEBrick/1.4.2 (Ruby/2.5.1/2018-03-29)",
:date => "Wed, 18 Sep 2019 13:47:04 GMT",
:content_length => "1756",
:set_cookie => [
[0] "request_method=PUT; path=/; secure; HttpOnly; SameSite=Lax",
[1] "_session_id=a6c9d20848e8187dea7e4e2f485bbe72; path=/; HttpOnly; secure; SameSite=Lax"
]
}
Interface was updated.