audiolize / vagrant-softlayer

This is a Vagrant plugin that adds a SoftLayer provider to Vagrant, allowing Vagrant to control and provision SoftLayer CCI instances.
MIT License
42 stars 15 forks source link

Feature request: Ability to specify the "Notes" field #45

Closed poflynn closed 9 years ago

poflynn commented 9 years ago

As I am automatically firing up machines (thanks guys!) I end up with a ton of machines with very similar names. It would be nice to be able to specify the 'notes' field so that when I log into the SL web UI I can see which machine is which. I have a feeling however that this is not an available field when requesting a machine, only when editing one? For example I only see it as available in the 'edit' method in this link https://softlayer-api-python-client.readthedocs.org/en/latest/api/managers/hardware/.

Thx

ju2wheels commented 9 years ago

Right, as far as the documentation its only available in editing, these are the create time options.

The Ruby equivalent would be something like:

sl_client = SoftLayer::Client.new(:api_key => ENV["SL_API_KEY"], :username => ENV["SL_API_USERNAME"], :timeout => 240)
current_box = SoftLayer::VirtualServer.find_servers(:client => sl_client, :datacenter => sl.datacenter, :hostname => sl.hostname, :domain => sl.domain).first
current_box.service.editObject({'id' => current_box['id'], 'notes' => "notes"}) if ! current_box.nil?
causton81 commented 9 years ago

I create my VMs with a unique domain like machine1.user.name.lab.example.com. Then I can filter in Device List by user.name or lab for example.

ju2wheels commented 9 years ago

closing, notes editing is available through calling sl api from vagrantfile and no option currently in API to send this at time of order