(vm)
Return the name of the network from the virtualMachine.
Return the name of the network from the virtualMachine.
Return the name of the network from the virtualMachine .
def get_vm_network_name(vm):
  """Return the name of the network from the virtualMachine."""

  if _API_VERSION == google_v2_versions.V2ALPHA1:
    return vm.get('network', {}).get('name')

  elif _API_VERSION == google_v2_versions.V2BETA:
    return vm.get('network', {}).get('network')

  else:
    assert False, 'Unexpected version: {}'.format(_API_VERSION)
def get_vm_network_name ( vm ) : if _API_VERSION == google_v2_versions . V2ALPHA1 : return vm . get ( 'network' , { } ) . get ( 'name' ) elif _API_VERSION == google_v2_versions . V2BETA : return vm . get ( 'network' , { } ) . get ( 'network' ) else : assert False , 'Unexpected version: {}' . format ( _API_VERSION )