Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #288 from modular-magician/codegen-pr-2873
Browse files Browse the repository at this point in the history
These fields were duplicated, they shouldn't be
  • Loading branch information
slevenick authored Dec 19, 2019
2 parents 35c2a11 + cec2c3c commit 9b939cb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions docs/resources/google_container_regional_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ Properties that can be accessed from the `google_container_regional_cluster` res

* `cluster_ipv4_cidr`: The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8.

* `enable_tpu`: (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - https://cloud.google.com/tpu/docs/kubernetes-engine-setup

* `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`).

* `addons_config`: Configurations for the various addons available to run in the cluster.

* `http_load_balancing`: Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster.
Expand Down Expand Up @@ -187,10 +191,6 @@ Properties that can be accessed from the `google_container_regional_cluster` res

* `expire_time`: The time the cluster will be automatically deleted in RFC3339 text format.

* `enable_tpu`: Enable the ability to use Cloud TPUs in this cluster.

* `tpu_ipv4_cidr_block`: The IP address range of the Cloud TPUs in this cluster, in CIDR notation

* `conditions`: Which conditions caused the current cluster state.

* `code`: Machine-friendly representation of the condition
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/google_container_regional_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ See [google_container_regional_cluster.md](google_container_regional_cluster.md)
* `networks`: an array of `google_container_regional_cluster` network
* `private_cluster_configs`: an array of `google_container_regional_cluster` private_cluster_config
* `cluster_ipv4_cidrs`: an array of `google_container_regional_cluster` cluster_ipv4_cidr
* `enable_tpus`: an array of `google_container_regional_cluster` enable_tpu
* `tpu_ipv4_cidr_blocks`: an array of `google_container_regional_cluster` tpu_ipv4_cidr_block
* `addons_configs`: an array of `google_container_regional_cluster` addons_config
* `subnetworks`: an array of `google_container_regional_cluster` subnetwork
* `locations`: an array of `google_container_regional_cluster` locations
Expand All @@ -49,8 +51,6 @@ See [google_container_regional_cluster.md](google_container_regional_cluster.md)
* `services_ipv4_cidrs`: an array of `google_container_regional_cluster` services_ipv4_cidr
* `current_node_counts`: an array of `google_container_regional_cluster` current_node_count
* `expire_times`: an array of `google_container_regional_cluster` expire_time
* `enable_tpus`: an array of `google_container_regional_cluster` enable_tpu
* `tpu_ipv4_cidr_blocks`: an array of `google_container_regional_cluster` tpu_ipv4_cidr_block
* `conditions`: an array of `google_container_regional_cluster` conditions
* `master_authorized_networks_configs`: an array of `google_container_regional_cluster` master_authorized_networks_config
* `locations`: an array of `google_container_regional_cluster` location
Expand Down
8 changes: 4 additions & 4 deletions libraries/google_container_regional_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class ContainerRegionalCluster < GcpResourceBase
attr_reader :network
attr_reader :private_cluster_config
attr_reader :cluster_ipv4_cidr
attr_reader :enable_tpu
attr_reader :tpu_ipv4_cidr_block
attr_reader :addons_config
attr_reader :subnetwork
attr_reader :locations
Expand All @@ -70,8 +72,6 @@ class ContainerRegionalCluster < GcpResourceBase
attr_reader :services_ipv4_cidr
attr_reader :current_node_count
attr_reader :expire_time
attr_reader :enable_tpu
attr_reader :tpu_ipv4_cidr_block
attr_reader :conditions
attr_reader :master_authorized_networks_config
attr_reader :location
Expand All @@ -94,6 +94,8 @@ def parse
@network = @fetched['network']
@private_cluster_config = GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(@fetched['privateClusterConfig'], to_s)
@cluster_ipv4_cidr = @fetched['clusterIpv4Cidr']
@enable_tpu = @fetched['enableTpu']
@tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock']
@addons_config = GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(@fetched['addonsConfig'], to_s)
@subnetwork = @fetched['subnetwork']
@locations = @fetched['locations']
Expand All @@ -114,8 +116,6 @@ def parse
@services_ipv4_cidr = @fetched['servicesIpv4Cidr']
@current_node_count = @fetched['currentNodeCount']
@expire_time = parse_time_string(@fetched['expireTime'])
@enable_tpu = @fetched['enableTpu']
@tpu_ipv4_cidr_block = @fetched['tpuIpv4CidrBlock']
@conditions = GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(@fetched['conditions'], to_s)
@master_authorized_networks_config = GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(@fetched['masterAuthorizedNetworksConfig'], to_s)
@location = @fetched['location']
Expand Down
8 changes: 4 additions & 4 deletions libraries/google_container_regional_clusters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class ContainerRegionalClusters < GcpResourceBase
filter_table_config.add(:networks, field: :network)
filter_table_config.add(:private_cluster_configs, field: :private_cluster_config)
filter_table_config.add(:cluster_ipv4_cidrs, field: :cluster_ipv4_cidr)
filter_table_config.add(:enable_tpus, field: :enable_tpu)
filter_table_config.add(:tpu_ipv4_cidr_blocks, field: :tpu_ipv4_cidr_block)
filter_table_config.add(:addons_configs, field: :addons_config)
filter_table_config.add(:subnetworks, field: :subnetwork)
filter_table_config.add(:locations, field: :locations)
Expand All @@ -53,8 +55,6 @@ class ContainerRegionalClusters < GcpResourceBase
filter_table_config.add(:services_ipv4_cidrs, field: :services_ipv4_cidr)
filter_table_config.add(:current_node_counts, field: :current_node_count)
filter_table_config.add(:expire_times, field: :expire_time)
filter_table_config.add(:enable_tpus, field: :enable_tpu)
filter_table_config.add(:tpu_ipv4_cidr_blocks, field: :tpu_ipv4_cidr_block)
filter_table_config.add(:conditions, field: :conditions)
filter_table_config.add(:master_authorized_networks_configs, field: :master_authorized_networks_config)
filter_table_config.add(:locations, field: :location)
Expand Down Expand Up @@ -107,6 +107,8 @@ def transformers
'network' => ->(obj) { return :network, obj['network'] },
'privateClusterConfig' => ->(obj) { return :private_cluster_config, GoogleInSpec::Container::Property::RegionalClusterPrivateClusterConfig.new(obj['privateClusterConfig'], to_s) },
'clusterIpv4Cidr' => ->(obj) { return :cluster_ipv4_cidr, obj['clusterIpv4Cidr'] },
'enableTpu' => ->(obj) { return :enable_tpu, obj['enableTpu'] },
'tpuIpv4CidrBlock' => ->(obj) { return :tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock'] },
'addonsConfig' => ->(obj) { return :addons_config, GoogleInSpec::Container::Property::RegionalClusterAddonsConfig.new(obj['addonsConfig'], to_s) },
'subnetwork' => ->(obj) { return :subnetwork, obj['subnetwork'] },
'locations' => ->(obj) { return :locations, obj['locations'] },
Expand All @@ -127,8 +129,6 @@ def transformers
'servicesIpv4Cidr' => ->(obj) { return :services_ipv4_cidr, obj['servicesIpv4Cidr'] },
'currentNodeCount' => ->(obj) { return :current_node_count, obj['currentNodeCount'] },
'expireTime' => ->(obj) { return :expire_time, parse_time_string(obj['expireTime']) },
'enableTpu' => ->(obj) { return :enable_tpu, obj['enableTpu'] },
'tpuIpv4CidrBlock' => ->(obj) { return :tpu_ipv4_cidr_block, obj['tpuIpv4CidrBlock'] },
'conditions' => ->(obj) { return :conditions, GoogleInSpec::Container::Property::RegionalClusterConditionsArray.parse(obj['conditions'], to_s) },
'masterAuthorizedNetworksConfig' => ->(obj) { return :master_authorized_networks_config, GoogleInSpec::Container::Property::RegionalClusterMasterAuthorizedNetworksConfig.new(obj['masterAuthorizedNetworksConfig'], to_s) },
'location' => ->(obj) { return :location, obj['location'] },
Expand Down

0 comments on commit 9b939cb

Please sign in to comment.