lib/fog/azurerm/models/compute/virtual_machine_extension.rb in fog-azure-rm-0.1.0 vs lib/fog/azurerm/models/compute/virtual_machine_extension.rb in fog-azure-rm-0.1.1
- old
+ new
@@ -31,21 +31,19 @@
virtual_machine_extension
end
def save
requires :resource_group, :location, :name, :vm_name, :type, :publisher, :type_handler_version, :settings
- vm_extension_params = get_vm_extension_params
vm_extension = service.create_or_update_vm_extension(vm_extension_params)
- merge_attributes(VirtualMachineExtension.parse(vm_extension))
+ merge_attributes(Fog::Compute::AzureRM::VirtualMachineExtension.parse(vm_extension))
end
def update(vm_extension_input)
validate_input(vm_extension_input)
merge_attributes(vm_extension_input) unless vm_extension_input.empty?
- vm_extension_params = get_vm_extension_params
vm_extension = service.create_or_update_vm_extension(vm_extension_params)
- merge_attributes(VirtualMachineExtension.parse(vm_extension))
+ merge_attributes(Fog::Compute::AzureRM::VirtualMachineExtension.parse(vm_extension))
end
def destroy
service.delete_vm_extension(resource_group, vm_name, name)
end
@@ -56,10 +54,10 @@
invalid_attr = [:id, :resource_group, :location, :name, :vm_name, :type, :publisher]
result = invalid_attr & vm_extension_input.keys
raise 'Cannot modify the given attribute(s)' unless result.empty?
end
- def get_vm_extension_params
+ def vm_extension_params
{
resource_group: resource_group,
location: location,
name: name,
vm_name: vm_name,