Softlayer - How to find the hardware server's image reference code by its image name
How can I find out the hardware server's image reference code by its image name ?
I tried searching the image Vyatta Subscription Edition for Bare metal 6.7.9
and VMware VSphere 6.5.0u1
here but did not find the image. Used the ruby gem to find out the images by following code
SoftLayer::ImageTemplate.find_public_templates(:name => name, client: client).first
But it was not able to find it.
ibm-cloud-infrastructure
add a comment |
How can I find out the hardware server's image reference code by its image name ?
I tried searching the image Vyatta Subscription Edition for Bare metal 6.7.9
and VMware VSphere 6.5.0u1
here but did not find the image. Used the ruby gem to find out the images by following code
SoftLayer::ImageTemplate.find_public_templates(:name => name, client: client).first
But it was not able to find it.
ibm-cloud-infrastructure
add a comment |
How can I find out the hardware server's image reference code by its image name ?
I tried searching the image Vyatta Subscription Edition for Bare metal 6.7.9
and VMware VSphere 6.5.0u1
here but did not find the image. Used the ruby gem to find out the images by following code
SoftLayer::ImageTemplate.find_public_templates(:name => name, client: client).first
But it was not able to find it.
ibm-cloud-infrastructure
How can I find out the hardware server's image reference code by its image name ?
I tried searching the image Vyatta Subscription Edition for Bare metal 6.7.9
and VMware VSphere 6.5.0u1
here but did not find the image. Used the ruby gem to find out the images by following code
SoftLayer::ImageTemplate.find_public_templates(:name => name, client: client).first
But it was not able to find it.
ibm-cloud-infrastructure
ibm-cloud-infrastructure
edited Nov 14 '18 at 12:01
Anupam K
asked Nov 14 '18 at 11:05
Anupam KAnupam K
751112
751112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I searched on my account and couldn't see any public image templates provided by SoftLayer with the names Vyatta Subscription Edition for Bare metal 6.7.9
or VMware VSphere 6.5.0u1
.
Image templates can be created from virtual guests only, so if you create and make them public then they should be listed here https://control.softlayer.com/devices/images, the portal page makes api calls to retrieve that list, the getPublicImages retrieves the public images and getPrivateBlockDeviceTemplateGroups the private ones
I can suggest you to use object-filters to search images which their name starts with "Vyatta", the filter is something like this:
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
Then your code should looks like the following:
SoftLayer::ImageTemplate.find_public_templates(:object_filter => filter)
It seems the find_public_templates
takes a long time when retrieving the data with object_filter so I can also suggest you my own script which I feel it retrieves the data a little faster:
require 'rubygems'
require 'softlayer_api'
require 'pp'
username = 'set me'
api_key = 'set me'
image_service = SoftLayer::Service.new('SoftLayer_Virtual_Guest_Block_Device_Template_Group',
username: username, api_key: api_key)
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
# Another way to set filters:
# filter = SoftLayer::ObjectFilter.new
# filter.set_criteria_for_key_path("name", "operation"=>"^= Vyatta")
begin
images = image_service.object_filter(filter).getPublicImages
pp images
rescue StandardError => e
puts "Error when executing the script... #e"
end
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298736%2fsoftlayer-how-to-find-the-hardware-servers-image-reference-code-by-its-image%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I searched on my account and couldn't see any public image templates provided by SoftLayer with the names Vyatta Subscription Edition for Bare metal 6.7.9
or VMware VSphere 6.5.0u1
.
Image templates can be created from virtual guests only, so if you create and make them public then they should be listed here https://control.softlayer.com/devices/images, the portal page makes api calls to retrieve that list, the getPublicImages retrieves the public images and getPrivateBlockDeviceTemplateGroups the private ones
I can suggest you to use object-filters to search images which their name starts with "Vyatta", the filter is something like this:
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
Then your code should looks like the following:
SoftLayer::ImageTemplate.find_public_templates(:object_filter => filter)
It seems the find_public_templates
takes a long time when retrieving the data with object_filter so I can also suggest you my own script which I feel it retrieves the data a little faster:
require 'rubygems'
require 'softlayer_api'
require 'pp'
username = 'set me'
api_key = 'set me'
image_service = SoftLayer::Service.new('SoftLayer_Virtual_Guest_Block_Device_Template_Group',
username: username, api_key: api_key)
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
# Another way to set filters:
# filter = SoftLayer::ObjectFilter.new
# filter.set_criteria_for_key_path("name", "operation"=>"^= Vyatta")
begin
images = image_service.object_filter(filter).getPublicImages
pp images
rescue StandardError => e
puts "Error when executing the script... #e"
end
add a comment |
I searched on my account and couldn't see any public image templates provided by SoftLayer with the names Vyatta Subscription Edition for Bare metal 6.7.9
or VMware VSphere 6.5.0u1
.
Image templates can be created from virtual guests only, so if you create and make them public then they should be listed here https://control.softlayer.com/devices/images, the portal page makes api calls to retrieve that list, the getPublicImages retrieves the public images and getPrivateBlockDeviceTemplateGroups the private ones
I can suggest you to use object-filters to search images which their name starts with "Vyatta", the filter is something like this:
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
Then your code should looks like the following:
SoftLayer::ImageTemplate.find_public_templates(:object_filter => filter)
It seems the find_public_templates
takes a long time when retrieving the data with object_filter so I can also suggest you my own script which I feel it retrieves the data a little faster:
require 'rubygems'
require 'softlayer_api'
require 'pp'
username = 'set me'
api_key = 'set me'
image_service = SoftLayer::Service.new('SoftLayer_Virtual_Guest_Block_Device_Template_Group',
username: username, api_key: api_key)
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
# Another way to set filters:
# filter = SoftLayer::ObjectFilter.new
# filter.set_criteria_for_key_path("name", "operation"=>"^= Vyatta")
begin
images = image_service.object_filter(filter).getPublicImages
pp images
rescue StandardError => e
puts "Error when executing the script... #e"
end
add a comment |
I searched on my account and couldn't see any public image templates provided by SoftLayer with the names Vyatta Subscription Edition for Bare metal 6.7.9
or VMware VSphere 6.5.0u1
.
Image templates can be created from virtual guests only, so if you create and make them public then they should be listed here https://control.softlayer.com/devices/images, the portal page makes api calls to retrieve that list, the getPublicImages retrieves the public images and getPrivateBlockDeviceTemplateGroups the private ones
I can suggest you to use object-filters to search images which their name starts with "Vyatta", the filter is something like this:
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
Then your code should looks like the following:
SoftLayer::ImageTemplate.find_public_templates(:object_filter => filter)
It seems the find_public_templates
takes a long time when retrieving the data with object_filter so I can also suggest you my own script which I feel it retrieves the data a little faster:
require 'rubygems'
require 'softlayer_api'
require 'pp'
username = 'set me'
api_key = 'set me'
image_service = SoftLayer::Service.new('SoftLayer_Virtual_Guest_Block_Device_Template_Group',
username: username, api_key: api_key)
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
# Another way to set filters:
# filter = SoftLayer::ObjectFilter.new
# filter.set_criteria_for_key_path("name", "operation"=>"^= Vyatta")
begin
images = image_service.object_filter(filter).getPublicImages
pp images
rescue StandardError => e
puts "Error when executing the script... #e"
end
I searched on my account and couldn't see any public image templates provided by SoftLayer with the names Vyatta Subscription Edition for Bare metal 6.7.9
or VMware VSphere 6.5.0u1
.
Image templates can be created from virtual guests only, so if you create and make them public then they should be listed here https://control.softlayer.com/devices/images, the portal page makes api calls to retrieve that list, the getPublicImages retrieves the public images and getPrivateBlockDeviceTemplateGroups the private ones
I can suggest you to use object-filters to search images which their name starts with "Vyatta", the filter is something like this:
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
Then your code should looks like the following:
SoftLayer::ImageTemplate.find_public_templates(:object_filter => filter)
It seems the find_public_templates
takes a long time when retrieving the data with object_filter so I can also suggest you my own script which I feel it retrieves the data a little faster:
require 'rubygems'
require 'softlayer_api'
require 'pp'
username = 'set me'
api_key = 'set me'
image_service = SoftLayer::Service.new('SoftLayer_Virtual_Guest_Block_Device_Template_Group',
username: username, api_key: api_key)
filter = SoftLayer::ObjectFilter.new do |img_filter|
img_filter.accept('name').when_it begins_with('Vyatta')
end
# Another way to set filters:
# filter = SoftLayer::ObjectFilter.new
# filter.set_criteria_for_key_path("name", "operation"=>"^= Vyatta")
begin
images = image_service.object_filter(filter).getPublicImages
pp images
rescue StandardError => e
puts "Error when executing the script... #e"
end
answered Nov 14 '18 at 20:46
Albert CamachoAlbert Camacho
1,0391312
1,0391312
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298736%2fsoftlayer-how-to-find-the-hardware-servers-image-reference-code-by-its-image%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown