Skip to content

Commit

Permalink
[azure][chore] Remove unused classes (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias authored Sep 5, 2024
1 parent 6be0feb commit 7cda232
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 282 deletions.
51 changes: 0 additions & 51 deletions plugins/azure/fix_plugin_azure/resource/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,57 +334,6 @@ class AzureCloudService(MicrosoftResource):
upgrade_mode: Optional[str] = field(default=None, metadata={'description': 'Upgrade mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible values are **auto** **manual** **simultaneous** if not specified, the default value is auto. If set to manual, put updatedomain must be called to apply the update. If set to auto, the update is automatically applied to each update domain in sequence.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureContainerServiceServicePrincipalProfile:
kind: ClassVar[str] = "azure_container_service_service_principal_profile"
mapping: ClassVar[Dict[str, Bender]] = {"client_id": S("clientId"), "secret": S("secret")}
client_id: Optional[str] = field(default=None, metadata={"description": "The id for the service principal."})
secret: Optional[str] = field(default=None, metadata={'description': 'The secret password associated with the service principal.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureContainerServiceMasterProfile:
kind: ClassVar[str] = "azure_container_service_master_profile"
mapping: ClassVar[Dict[str, Bender]] = {"count": S("count"), "dns_prefix": S("dnsPrefix"), "fqdn": S("fqdn")}
count: Optional[int] = field(default=None, metadata={'description': 'Number of masters (vms) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.'}) # fmt: skip
dns_prefix: Optional[str] = field(default=None, metadata={'description': 'Dns prefix to be used to create the fqdn for master.'}) # fmt: skip
fqdn: Optional[str] = field(default=None, metadata={"description": "Fqdn for the master."})


@define(eq=False, slots=False)
class AzureContainerServiceWindowsProfile:
kind: ClassVar[str] = "azure_container_service_windows_profile"
mapping: ClassVar[Dict[str, Bender]] = {"admin_password": S("adminPassword"), "admin_username": S("adminUsername")}
admin_password: Optional[str] = field(default=None, metadata={'description': 'The administrator password to use for windows vms.'}) # fmt: skip
admin_username: Optional[str] = field(default=None, metadata={'description': 'The administrator username to use for windows vms.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureContainerServiceSshConfiguration:
kind: ClassVar[str] = "azure_container_service_ssh_configuration"
mapping: ClassVar[Dict[str, Bender]] = {"public_keys": S("publicKeys", default=[]) >> ForallBend(S("keyData"))}
public_keys: Optional[List[str]] = field(default=None, metadata={'description': 'The list of ssh public keys used to authenticate with linux-based vms.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureContainerServiceLinuxProfile:
kind: ClassVar[str] = "azure_container_service_linux_profile"
mapping: ClassVar[Dict[str, Bender]] = {
"admin_username": S("adminUsername"),
"ssh": S("ssh") >> Bend(AzureContainerServiceSshConfiguration.mapping),
}
admin_username: Optional[str] = field(default=None, metadata={'description': 'The administrator username to use for linux vms.'}) # fmt: skip
ssh: Optional[AzureContainerServiceSshConfiguration] = field(default=None, metadata={'description': 'Ssh configuration for linux-based vms running on azure.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureContainerServiceVMDiagnostics:
kind: ClassVar[str] = "azure_container_service_vm_diagnostics"
mapping: ClassVar[Dict[str, Bender]] = {"enabled": S("enabled"), "storage_uri": S("storageUri")}
enabled: Optional[bool] = field(default=None, metadata={'description': 'Whether the vm diagnostic agent is provisioned on the vm.'}) # fmt: skip
storage_uri: Optional[str] = field(default=None, metadata={'description': 'The uri of the storage account where diagnostics are stored.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureDedicatedHostGroupInstanceView:
kind: ClassVar[str] = "azure_dedicated_host_group_instance_view"
Expand Down
43 changes: 0 additions & 43 deletions plugins/azure/fix_plugin_azure/resource/containerservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,6 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None:
builder.add_edge(self, edge_type=EdgeType.default, clazz=AzureManagedCluster, id=cluster_id)


@define(eq=False, slots=False)
class AzureKubernetesVersionCapabilities:
kind: ClassVar[str] = "azure_kubernetes_version_capabilities"
mapping: ClassVar[Dict[str, Bender]] = {"support_plan": S("supportPlan")}
support_plan: Optional[List[str]] = field(default=None, metadata={"description": ""})


@define(eq=False, slots=False)
class AzureKubernetesPatchVersion:
kind: ClassVar[str] = "azure_kubernetes_patch_version"
mapping: ClassVar[Dict[str, Bender]] = {"upgrades": S("upgrades")}
upgrades: Optional[List[str]] = field(default=None, metadata={'description': 'Possible upgrade path for given patch version'}) # fmt: skip


@define(eq=False, slots=False)
class AzureManagedClusterSKU:
kind: ClassVar[str] = "azure_managed_cluster_sku"
Expand Down Expand Up @@ -896,35 +882,6 @@ def _get_poolnames_and_vmss_ids(self, builder: GraphBuilder) -> List[Tuple[str,
]


@define(eq=False, slots=False)
class AzureCompatibleVersions:
kind: ClassVar[str] = "azure_compatible_versions"
mapping: ClassVar[Dict[str, Bender]] = {"name": S("name"), "versions": S("versions")}
name: Optional[str] = field(default=None, metadata={"description": "The product/service name."})
versions: Optional[List[str]] = field(default=None, metadata={'description': 'Product/service versions compatible with a service mesh add-on revision.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureMeshRevision:
kind: ClassVar[str] = "azure_mesh_revision"
mapping: ClassVar[Dict[str, Bender]] = {
"compatible_with": S("compatibleWith") >> ForallBend(AzureCompatibleVersions.mapping),
"revision": S("revision"),
"upgrades": S("upgrades"),
}
compatible_with: Optional[List[AzureCompatibleVersions]] = field(default=None, metadata={'description': 'List of items this revision of service mesh is compatible with, and their associated versions.'}) # fmt: skip
revision: Optional[str] = field(default=None, metadata={"description": "The revision of the mesh release."})
upgrades: Optional[List[str]] = field(default=None, metadata={'description': 'List of revisions available for upgrade of a specific mesh revision'}) # fmt: skip


@define(eq=False, slots=False)
class AzureOSOptionProperty:
kind: ClassVar[str] = "azure_os_option_property"
mapping: ClassVar[Dict[str, Bender]] = {"enable_fips_image": S("enable-fips-image"), "os_type": S("os-type")}
enable_fips_image: Optional[bool] = field(default=None, metadata={'description': 'Whether the image is FIPS-enabled.'}) # fmt: skip
os_type: Optional[str] = field(default=None, metadata={"description": "The OS type."})


@define(eq=False, slots=False)
class AzureManagedClusterSnapshot(MicrosoftResource, BaseSnapshot):
kind: ClassVar[str] = "azure_managed_cluster_snapshot"
Expand Down
33 changes: 0 additions & 33 deletions plugins/azure/fix_plugin_azure/resource/cosmosdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2569,21 +2569,6 @@ def collect_server_configs() -> None:
graph_builder.submit_work(service_name, collect_server_configs)


@define(eq=False, slots=False)
class AzureServerRoleGroupConfiguration:
kind: ClassVar[str] = "azure_server_role_group_configuration"
mapping: ClassVar[Dict[str, Bender]] = {
"default_value": S("defaultValue"),
"role": S("role"),
"source": S("source"),
"value": S("value"),
}
default_value: Optional[str] = field(default=None, metadata={"description": "Default value of the configuration."})
role: Optional[str] = field(default=None, metadata={"description": "The role of a server."})
source: Optional[str] = field(default=None, metadata={"description": "Source of the configuration."})
value: Optional[str] = field(default=None, metadata={"description": "Value of the configuration."})


@define(eq=False, slots=False)
class AzureCosmosDBPostgresqlClusterConfiguration(MicrosoftResource, AzureProxyResource):
kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_configuration"
Expand Down Expand Up @@ -2653,24 +2638,6 @@ def collect_configs(
return []


@define(eq=False, slots=False)
class AzureCosmosDBPostgresqlClusterFirewallRule(MicrosoftResource, AzureProxyResource):
kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_firewall_rule"
# Collect via AzureCosmosDBPostgresqlCluster()
mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | {
"id": S("id"),
"tags": S("tags", default={}),
"name": S("name"),
"ctime": S("systemData", "createdAt"),
"mtime": S("systemData", "lastModifiedAt"),
"end_ip_address": S("properties", "endIpAddress"),
"provisioning_state": S("properties", "provisioningState"),
"start_ip_address": S("properties", "startIpAddress"),
}
end_ip_address: Optional[str] = field(default=None, metadata={'description': 'The end IP address of the cluster firewall rule. Must be IPv4 format.'}) # fmt: skip
start_ip_address: Optional[str] = field(default=None, metadata={'description': 'The start IP address of the cluster firewall rule. Must be IPv4 format.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureCosmosDBPostgresqlClusterPrivateEndpointConnection(MicrosoftResource):
kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_private_endpoint_connection"
Expand Down
44 changes: 0 additions & 44 deletions plugins/azure/fix_plugin_azure/resource/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3829,35 +3829,6 @@ class AzureLoadBalancingRule(AzureSubResource):
type: Optional[str] = field(default=None, metadata={"description": "Type of the resource."})


@define(eq=False, slots=False)
class AzureProbe(AzureSubResource):
kind: ClassVar[str] = "azure_probe"
mapping: ClassVar[Dict[str, Bender]] = AzureSubResource.mapping | {
"etag": S("etag"),
"interval_in_seconds": S("properties", "intervalInSeconds"),
"load_balancing_rules": S("properties") >> S("loadBalancingRules", default=[]) >> ForallBend(S("id")),
"name": S("name"),
"number_of_probes": S("properties", "numberOfProbes"),
"port": S("properties", "port"),
"probe_threshold": S("properties", "probeThreshold"),
"protocol": S("properties", "protocol"),
"provisioning_state": S("properties", "provisioningState"),
"request_path": S("properties", "requestPath"),
"type": S("type"),
}
etag: Optional[str] = field(default=None, metadata={'description': 'A unique read-only string that changes whenever the resource is updated.'}) # fmt: skip
interval_in_seconds: Optional[int] = field(default=None, metadata={'description': 'The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.'}) # fmt: skip
load_balancing_rules: Optional[List[str]] = field(default=None, metadata={'description': 'The load balancer rules that use this probe.'}) # fmt: skip
name: Optional[str] = field(default=None, metadata={'description': 'The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource.'}) # fmt: skip
number_of_probes: Optional[int] = field(default=None, metadata={'description': 'The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.'}) # fmt: skip
port: Optional[int] = field(default=None, metadata={'description': 'The port for communicating the probe. Possible values range from 1 to 65535, inclusive.'}) # fmt: skip
probe_threshold: Optional[int] = field(default=None, metadata={'description': 'The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation.'}) # fmt: skip
protocol: Optional[str] = field(default=None, metadata={'description': 'The protocol of the end point. If Tcp is specified, a received ACK is required for the probe to be successful. If Http or Https is specified, a 200 OK response from the specifies URI is required for the probe to be successful.'}) # fmt: skip
provisioning_state: Optional[str] = field(default=None, metadata={'description': 'The current provisioning state.'}) # fmt: skip
request_path: Optional[str] = field(default=None, metadata={'description': 'The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value.'}) # fmt: skip
type: Optional[str] = field(default=None, metadata={"description": "Type of the resource."})


@define(eq=False, slots=False)
class AzureInboundNatPool(AzureSubResource):
kind: ClassVar[str] = "azure_inbound_nat_pool"
Expand Down Expand Up @@ -4452,21 +4423,6 @@ def collect_flow_logs() -> None:
graph_builder.submit_work(service_name, collect_flow_logs)


@define(eq=False, slots=False)
class AzureProviderResourceOperationDescription:
kind: ClassVar[str] = "azure_provider_resource_operation_description"
mapping: ClassVar[Dict[str, Bender]] = {
"description": S("description"),
"operation": S("operation"),
"provider": S("provider"),
"resource": S("resource"),
}
description: Optional[str] = field(default=None, metadata={"description": "Description of the operation."})
operation: Optional[str] = field(default=None, metadata={'description': 'Type of the operation: get, read, delete, etc.'}) # fmt: skip
provider: Optional[str] = field(default=None, metadata={"description": "Service provider: Microsoft Network."})
resource: Optional[str] = field(default=None, metadata={'description': 'Resource on which the operation is performed.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureAddressSpace:
kind: ClassVar[str] = "azure_address_space"
Expand Down
15 changes: 0 additions & 15 deletions plugins/azure/fix_plugin_azure/resource/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,21 +380,6 @@ class AzurePostgresqlServerFirewallRule(MicrosoftResource, AzureProxyResource):
system_data: Optional[AzureSystemData] = field(default=None, metadata={'description': 'Metadata pertaining to creation and last modification of the resource.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureOperationDisplay:
kind: ClassVar[str] = "azure_operation_display"
mapping: ClassVar[Dict[str, Bender]] = {
"description": S("description"),
"operation": S("operation"),
"provider": S("provider"),
"resource": S("resource"),
}
description: Optional[str] = field(default=None, metadata={"description": "Operation description."})
operation: Optional[str] = field(default=None, metadata={'description': 'Localized friendly name for the operation.'}) # fmt: skip
provider: Optional[str] = field(default=None, metadata={"description": "Operation resource provider name."})
resource: Optional[str] = field(default=None, metadata={'description': 'Resource on which the operation is performed.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureAuthConfig:
kind: ClassVar[str] = "azure_auth_config"
Expand Down
57 changes: 0 additions & 57 deletions plugins/azure/fix_plugin_azure/resource/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,63 +302,6 @@ class AzureQueue(MicrosoftResource, BaseQueue):
queue_metadata: Optional[Dict[str, str]] = field(default=None, metadata={'description': 'A name-value pair that represents queue metadata.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureProviderResourceOperationDescription:
kind: ClassVar[str] = "azure_provider_resource_operation_description"
mapping: ClassVar[Dict[str, Bender]] = {
"description": S("description"),
"operation": S("operation"),
"provider": S("provider"),
"resource": S("resource"),
}
description: Optional[str] = field(default=None, metadata={"description": "Description of the operation."})
operation: Optional[str] = field(default=None, metadata={'description': 'Type of operation: get, read, delete, etc.'}) # fmt: skip
provider: Optional[str] = field(default=None, metadata={"description": "Service provider: Microsoft Storage."})
resource: Optional[str] = field(default=None, metadata={'description': 'Resource on which the operation is performed etc.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureDimension:
kind: ClassVar[str] = "azure_dimension"
mapping: ClassVar[Dict[str, Bender]] = {"display_name": S("displayName"), "name": S("name")}
display_name: Optional[str] = field(default=None, metadata={"description": "Display name of dimension."})
name: Optional[str] = field(default=None, metadata={"description": "Display name of dimension."})


@define(eq=False, slots=False)
class AzureMetricSpecification:
kind: ClassVar[str] = "azure_metric_specification"
mapping: ClassVar[Dict[str, Bender]] = {
"aggregation_type": S("aggregationType"),
"category": S("category"),
"dimensions": S("dimensions") >> ForallBend(AzureDimension.mapping),
"display_description": S("displayDescription"),
"display_name": S("displayName"),
"fill_gap_with_zero": S("fillGapWithZero"),
"name": S("name"),
"resource_id_dimension_name_override": S("resourceIdDimensionNameOverride"),
"unit": S("unit"),
}
aggregation_type: Optional[str] = field(default=None, metadata={'description': 'Aggregation type could be Average.'}) # fmt: skip
category: Optional[str] = field(default=None, metadata={'description': 'The category this metric specification belong to, could be Capacity.'}) # fmt: skip
dimensions: Optional[List[AzureDimension]] = field(default=None, metadata={'description': 'Dimensions of blobs, including blob type and access tier.'}) # fmt: skip
display_description: Optional[str] = field(default=None, metadata={'description': 'Display description of metric specification.'}) # fmt: skip
display_name: Optional[str] = field(default=None, metadata={'description': 'Display name of metric specification.'}) # fmt: skip
fill_gap_with_zero: Optional[bool] = field(default=None, metadata={'description': 'The property to decide fill gap with zero or not.'}) # fmt: skip
name: Optional[str] = field(default=None, metadata={"description": "Name of metric specification."})
resource_id_dimension_name_override: Optional[str] = field(default=None, metadata={'description': 'Account Resource Id.'}) # fmt: skip
unit: Optional[str] = field(default=None, metadata={"description": "Unit could be Bytes or Count."})


@define(eq=False, slots=False)
class AzureServiceSpecification:
kind: ClassVar[str] = "azure_service_specification"
mapping: ClassVar[Dict[str, Bender]] = {
"metric_specifications": S("metricSpecifications") >> ForallBend(AzureMetricSpecification.mapping)
}
metric_specifications: Optional[List[AzureMetricSpecification]] = field(default=None, metadata={'description': 'Metric specifications of operation.'}) # fmt: skip


@define(eq=False, slots=False)
class AzureStorageSkuCapability:
kind: ClassVar[str] = "azure_storage_sku_capability"
Expand Down
Loading

0 comments on commit 7cda232

Please sign in to comment.