Class: Google::Apis::TpuV2alpha1::NetworkConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/tpu_v2alpha1/classes.rb,
lib/google/apis/tpu_v2alpha1/representations.rb,
lib/google/apis/tpu_v2alpha1/representations.rb

Overview

Network related configurations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkConfig

Returns a new instance of NetworkConfig.



807
808
809
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 807

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#can_ip_forwardBoolean Also known as: can_ip_forward?

Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes. Corresponds to the JSON property canIpForward

Returns:

  • (Boolean)


778
779
780
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 778

def can_ip_forward
  @can_ip_forward
end

#enable_external_ipsBoolean Also known as: enable_external_ips?

Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled. Corresponds to the JSON property enableExternalIps

Returns:

  • (Boolean)


786
787
788
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 786

def enable_external_ips
  @enable_external_ips
end

#networkString

The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, "default" will be used. Corresponds to the JSON property network

Returns:

  • (String)


793
794
795
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 793

def network
  @network
end

#queue_countFixnum

Optional. Specifies networking queue count for TPU VM instance's network interface. Corresponds to the JSON property queueCount

Returns:

  • (Fixnum)


799
800
801
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 799

def queue_count
  @queue_count
end

#subnetworkString

The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, "default" will be used. Corresponds to the JSON property subnetwork

Returns:

  • (String)


805
806
807
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 805

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



812
813
814
815
816
817
818
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 812

def update!(**args)
  @can_ip_forward = args[:can_ip_forward] if args.key?(:can_ip_forward)
  @enable_external_ips = args[:enable_external_ips] if args.key?(:enable_external_ips)
  @network = args[:network] if args.key?(:network)
  @queue_count = args[:queue_count] if args.key?(:queue_count)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end