Comments (3)
Scott thank you for the help.
did U fix the problem or U want me to make change?
Since I do not call any of this method
this is the code that runs into this error
require 'softlayer_api'
require 'pp'
@client = SoftLayer::Client.new
packages = SoftLayer::ProductPackage.bare_metal_server_packages(@client)
packages.each { |package| puts "#{package.id}\t#{package.name}" }
package_ids = packages.map &:id # { |pacakge| pacakge.id }
server and ram
File.open('/tmp/prices.txt', 'w') do |f|
package_ids.each do |packageid|
f.puts "\n============================"
f.puts packageid
f.puts '============================'
# packageid = package.id
sl_bm_package = SoftLayer::ProductPackage.package_with_id(packageid, @client)
# Now we need to now what ProductItemCategories are required to
# configure a server in that package. This code prints out a table
# of the required category codes with a description of each
f.puts "\nRequired Categories for '#{sl_bm_package.name}':"
required_categories = sl_bm_package.configuration.select { |x| x.name.to_s.downcase == 'server' || x.name.to_s.downcase == 'ram' }
# puts required_categories.size()
# pp required_categories
required_categories.each do |category|
config_options = category.configuration_options
f.puts "\nConfiguration options in the '#{category.name}' category:"
config_options.each { |option| f.printf "%5s\t#{option.description}\n", option.price_id }
end
f.fsync
end
end
code print out all packages and cpu/ram details
from softlayer-ruby.
I apologize. I had responded while looking at an older version of the code. Then I realized my mistake and deleted my comment. Then I fixed the problem and released a 3.1.1 release with the fix. If you gem update softlayer_api, you should get the 3.1.1 build with the bug fix.
from softlayer-ruby.
As always you are great
yep it did fix problem that I encountered. Thank you
from softlayer-ruby.
Related Issues (20)
- "provisioned" status not updating in wait_for_ready HOT 4
- Accessing ResourceMetadata without an API key HOT 2
- adding bandwidth allotment to VirtualServerOrder.rb HOT 2
- 500 error on getNextInvoiceTopLevelBillingItems for large accounts HOT 2
- VirtualServerOrder_Package class doesn't define VLANs HOT 4
- Bare Metal Package order examples not working HOT 1
- Exception: object_mask expects strings (ArgumentError) HOT 1
- VirtualServerUpgradeOrder cannot add additional disks HOT 2
- Tags still have referenceCount > 0 after all devices are canceled HOT 1
- BareMetal order fails for win 2008 HOT 4
- Placing order with upgrade item id 82 gave me the wrong result
- Baremetal order may fail for some datacenters
- Provide the ability to add datacentres by 'name' (currently its only 'id') for Image templates HOT 3
- Ruby code required for tagging Softlayer assets with TagKey and TagValue using SoftLayer API
- XMLRPC is now removed from stdlib
- Support for Family sizes HOT 1
- Request: release new version HOT 1
- rdoc for SoftLayer::ImageTemplate class documents two attributes (globalIdentifier and note) that aren't supported HOT 18
- Gem attributes are a mix of snake case and camel case - all should be snake case HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from softlayer-ruby.