fog/fog-azure-rm

View on GitHub
lib/fog/azurerm/requests/compute/get_virtual_machine.rb

Summary

Maintainability
A
2 hrs
Test Coverage
F
42%

Method get_virtual_machine has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def get_virtual_machine(*)
          vm = {
            'location' => 'westus',
            'id' => '/subscriptions/########-####-####-####-############/resourceGroups/fog-test-rg/providers/Microsoft.Compute/virtualMachines/fog-test-server',
            'name' => 'fog-test-server',
Severity: Major
Found in lib/fog/azurerm/requests/compute/get_virtual_machine.rb - About 2 hrs to fix

    Use the return of the conditional for variable assignment and comparison.
    Open

                if async
                  response = @compute_mgmt_client.virtual_machines.get_async(resource_group, name, INSTANCE_VIEW)
                else
                  response = @compute_mgmt_client.virtual_machines.get(resource_group, name, INSTANCE_VIEW)
                end

    There are no issues that match your filters.

    Category
    Status