-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin does not support xaas format #72
Comments
@sbrar7 You are correct in that we have not tested this gem with an XaaS blueprint. However the changes in v2.7.0 of the |
Have anyone tested the version 2.7.0 for xaas- blueprint? |
@stuartpreston . wrt sbrar7, we tried using the vmware-vra gem version 2.7.0 on xaas blueprint using the kitchen.yml stated below. We are trying to pass the extra_parameters to vra. But we are getting " Message: Failed to complete #create action: [undefined method `[]' for nil:NilClass]. while running kitchen create. .kitchen.yml
Error while running kitchen create
|
@stuartpreston . Any update.?. |
Hi Stuart,
I tried it multiple times but the same error it throws which is Nil class.
It is looking for the Blueprint data (Blueprint id) for the xaas Blueprint
which the xaas blueprints doesn't provide as we have a underlying composite
Blueprints which gets provisioned when the Xaas Blueprint is called. The
major issue revolves around the line 56 where the gem looks for the
blueprint id for the catalog item. if this can be resolved then i feel it
will work for xaas. Some logic has to be implemented to make gem skip
reading the blueprint id for the xaas blueprints. I am also attaching the
part of the gem where the build fails.
Catalog-request.rb
line 49 in gem version 2.6.1,2.6.2 and line 56 in version 2.7.1 (Marked
bold needs to be fixed and make the vra skip reading this for xaas)
def self.request_from_payload(client, payload_file)
hash_payload = JSON.parse(File.read(payload_file))
catalog_id = hash_payload["catalogItemId"]
blueprint_name = hash_payload["data"].select { |_k, v| v.is_a?(Hash)
}.keys.first
*blueprint_data = hash_payload["data"][blueprint_name]*
opts = {}
opts[:cpus] =* blueprint_data*["data"]["cpu"]
opts[:memory] = blueprint_data["data"]["memory"]
opts[:requested_for] = hash_payload["requestedFor"]
opts[:lease_days] = blueprint_data.fetch("leaseDays", nil) || hash_payload["
data"].fetch("_lease_days", 1)
opts[:description] = hash_payload["description"]
opts[:subtenant_id] = hash_payload["businessGroupId"]
cr = Vra::CatalogRequest.new(client, catalog_id, opts)
cr.template_payload = File.read(payload_file)
cr
end
…On Fri, Jun 7, 2019 at 1:35 AM mithujose ***@***.***> wrote:
@stuartpreston <https://github.com/stuartpreston> . Any update.?. I hope
the feature request will be implemented soon and hope to solve our issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#72>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKU6QSPBDVHLLQMJ4B7DLQTPZHXTFANCNFSM4GG3R5QA>
.
|
The gem looks for Blueprint data within the blueprint name assigned. This if can be skipped for xaas blueprints should make it work. i am posting the block where this comes into picture. |
@stuartpreston <https://github.com/stuartpreston> As reported below, there
are still issues after the latest changes to the plugin. Can you pls help
here.
Thanks
…On Fri, 7 Jun 2019 at 3:35 pm mithujose ***@***.***> wrote:
@stuartpreston <https://github.com/stuartpreston> . Any update.?. I hope
the feature request will be implemented soon and hope to solve our issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIZ2OYMAXYWOQVN2KMJAA4TPZHXTFANCNFSM4GG3R5QA>
.
|
Hi - thanks for the message but I am not dedicated to fixing this problem at the moment due to other project work, there is no committed timeline for adding Xaas support but we're very aware more are more environments are using Xaas blueprints and so hope to tackle it ourselves unless someone has the environment in which to test and contribute the relevant fixes. Thanks |
Versions:
Platform Details
Scenario:
We are using an XaaS based blueprint rather than the composite blueprint(IaaS) and we are trying to use the gem to provision a vm with kitchen using the vra driver but it fails. It works for IaaS based pattern though.
Steps to Reproduce:
Use a kitchen config with vra driver and an xaas catalog item to provision a vm.
`—
driver:
name: vra
username:
password:
tenant: dev
base_url: https://dev.cloud.vra.com
verify_ssl: false
catalog_name: "Linux"
catalog_id: "02e8c875-2000-4311-aa17-1baf663f3263"
requestedFor: "[email protected]"
subtenant_id: "e6c74449-5da5-4414-b319-61d62a1b"
extra_parameters:
AdditionalDiskRequired:
type: string
value: false
Backup:
type: string
value: true
Deployment:
type: string
value: "TerraForm"
Environment:
type: string
value: "Production"
OSversion:
type: string
value: "RHEL 7.3"
Site:
type: string
value: "Site01"
Size:
type: string
value: "MEDIUM1_4CPU_8GBRAM_40GBDISK"
SupportTier:
type: string
value: "Low Touch"
Zone:
type: string
value: "Web and Application Zone"
NumberOfInstances:
type: integer
value: 1
platforms:
name: Linux
suites:
name: default
run_list:
recipe[java::default]
verifier:
inspec_tests:
test/smoke/default
attributes:`
Expected Result:
A virtual machine should get provisioned from the requested catalog id which is based on XaaS format.
Actual Result:
It fails to create the same as I believe the gem is designed for IaaS format.
The text was updated successfully, but these errors were encountered: