Skip to content
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

Picture support for Generic Object Definitions #114

Merged
merged 1 commit into from
Oct 6, 2017
Merged

Picture support for Generic Object Definitions #114

merged 1 commit into from
Oct 6, 2017

Conversation

jntullo
Copy link

@jntullo jntullo commented Oct 6, 2017

This PR allows for the creation and specification of pictures for Generic Object Definitions.

Usage

Specifying new pictures

Can specify an extension and Base64 Content for a picture which will then get created and added to the Generic Object Definition:

{
  "name":"LoadBalancer",
  "description":"LoadBalancer description",
  "properties":{
     ...
  },
  "picture":{
    "extension":"png",
    "content":"===Base64 Content Here==="
  }
}
Specifying Existing pictures

Supports ID specification:

{
  "name":"LoadBalancer",
  "description":"LoadBalancer description",
  "properties":{
     ...
  },
  "picture":{
    "id":"1000000000001",
  }
}

Supports href specification:

{
  "name":"LoadBalancer",
  "description":"LoadBalancer description",
  "properties":{
     ...
  },
  "picture":{
    "href":"/api/pictures/1000000000001",
  }
}

@miq-bot add_label enhancement
@miq-bot assign @abellotti

cc: @chalettu @AparnaKarve

@abellotti
Copy link
Member

😍 the flexible inbound signature. will review shortly.

@miq-bot
Copy link
Member

miq-bot commented Oct 6, 2017

Checked commit jntullo@fb69748 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@abellotti
Copy link
Member

Thanks @jntullo for this Enhancement.

Just kicked the tire here 👍

Some test queries post the create/updates I've tried:

api get generic_objects --expand=resources --attributes=generic_object_definition.picture
api get generic_objects --expand=resources --attributes=generic_object_definition.picture,generic_object_definition.picture.image_href
api get generic_object_definitions --expand=resources
api get generic_object_definitions --expand=resources --attributes=picture,picture.image_href

@abellotti abellotti merged commit f9fd3b6 into ManageIQ:master Oct 6, 2017
@abellotti abellotti added this to the Sprint 71 Ending Oct 16, 2017 milestone Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants