<commit_before># frozen_string_literal: true

module Fog
  module Compute
    class Aliyun < Fog::Service
      recognizes :aliyun_url,
                 :aliyun_accesskey_id,
                 :aliyun_accesskey_secret,
                 :aliyun_region_id,
                 :aliyun_zone_id

      ## MODELS
      #
      model_path 'fog/aliyun/models/compute'
      model :server
      collection :servers
      model :image
      collection :images
      model :eip_address
      collection :eip_addresses
      model :security_group
      collection :security_groups
      model :security_group_rule
      collection :security_group_rules
      model :volume
      collection :volumes
      model :snapshot
      collection :snapshots
      model :vpc
      collection :vpcs
      model :vswitch
      collection :vswitches
      model :vrouter
      collection :vrouters
      model :route_table
      collection :route_tables
      model :route_entry
      collection :route_entrys

      ## REQUESTS
      #
      request_path 'fog/aliyun/requests/compute'

      # Server CRUD
      request :list_servers
      request :list_server_types
      request :create_server
      request :delete_server

      # Server Actions
      request :reboot_server
      request :start_server
      request :stop_server

      # SnapShoot CRUD
      request :list_snapshots
      request :create_snapshot
      request :delete_snapshot

      # Image CRUD
      request :list_images
      request :create_image
      request :delete_image

      # Eip
      request :list_eip_addresses
      request :allocate_eip_address
      request :release_eip_address
      request :associate_eip_address
      request :unassociate_eip_address

      # Security Group
      request :list_security_groups
      request :list_security_group_rules
      request :create_security_group
      request :create_security_group_ip_rule
      request :create_security_group_sg_rule
      request :create_security_group_egress_ip_rule
      request :create_security_group_egress_sg_rule
      request :delete_security_group
      request :delete_security_group_ip_rule
      request :delete_security_group_sg_rule
      request :delete_security_group_egress_ip_rule
      request :delete_security_group_egress_sg_rule
      request :join_security_group
      request :leave_security_group

      # Zones
      request :list_zones

      # VPC
      request :create_vpc
      request :delete_vpc
      request :list_vpcs
      request :create_vswitch
      request :delete_vswitch
      request :list_vswitchs
      request :modify_vpc
      request :modify_vswitch
      request :list_vpn_gateways
      request :list_vpn_customergateways
      request :list_vpn_connections
      request :create_vpn_customergateway
      request :create_vpn_connection
      request :delete_vpn_customergateway
      request :delete_vpn_connection
      # VRouter
      request :list_vrouters

      # RouteTable
      request :list_route_tables

      # clouddisk
      request :list_disks
      request :create_disk
      request :delete_disk
      request :attach_disk
      request :detach_disk<commit_msg>Add allocate_public_ip_address in compute<commit_after># frozen_string_literal: true

module Fog
  module Compute
    class Aliyun < Fog::Service
      recognizes :aliyun_url,
                 :aliyun_accesskey_id,
                 :aliyun_accesskey_secret,
                 :aliyun_region_id,
                 :aliyun_zone_id

      ## MODELS
      #
      model_path 'fog/aliyun/models/compute'
      model :server
      collection :servers
      model :image
      collection :images
      model :eip_address
      collection :eip_addresses
      model :security_group
      collection :security_groups
      model :security_group_rule
      collection :security_group_rules
      model :volume
      collection :volumes
      model :snapshot
      collection :snapshots
      model :vpc
      collection :vpcs
      model :vswitch
      collection :vswitches
      model :vrouter
      collection :vrouters
      model :route_table
      collection :route_tables
      model :route_entry
      collection :route_entrys

      ## REQUESTS
      #
      request_path 'fog/aliyun/requests/compute'

      # Server CRUD
      request :list_servers
      request :list_server_types
      request :create_server
      request :delete_server

      # Server Actions
      request :reboot_server
      request :start_server
      request :stop_server

      # SnapShoot CRUD
      request :list_snapshots
      request :create_snapshot
      request :delete_snapshot

      # Image CRUD
      request :list_images
      request :create_image
      request :delete_image

      # Eip
      request :list_eip_addresses
      request :allocate_eip_address
      request :release_eip_address
      request :associate_eip_address
      request :unassociate_eip_address

      # Security Group
      request :list_security_groups
      request :list_security_group_rules
      request :create_security_group
      request :create_security_group_ip_rule
      request :create_security_group_sg_rule
      request :create_security_group_egress_ip_rule
      request :create_security_group_egress_sg_rule
      request :delete_security_group
      request :delete_security_group_ip_rule
      request :delete_security_group_sg_rule
      request :delete_security_group_egress_ip_rule
      request :delete_security_group_egress_sg_rule
      request :join_security_group
      request :leave_security_group

      # Zones
      request :list_zones

      # VPC
      request :create_vpc
      request :delete_vpc
      request :list_vpcs
      request :create_vswitch
      request :delete_vswitch
      request :list_vswitchs
      request :modify_vpc
      request :modify_vswitch
      request :list_vpn_gateways
      request :list_vpn_customergateways
      request :list_vpn_connections
      request :create_vpn_customergateway
      request :create_vpn_connection
      request :delete_vpn_customergateway
      request :delete_vpn_connection
      # VRouter
      request :list_vrouters

      # RouteTable
      request :list_route_tables

      # clouddisk
      request :list_disks
      request :create_disk
      request :delete_disk
      request :attach_disk
      request :detach_disk

      # PublicIpAddress
      request :allocate_public_ip_address
{'fraction_non_alphanumeric': 0.038659392049883085, 'fraction_numerical': 0.0, 'mean_word_length': 2.578360290016732, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7026095', 'n_tokens_mistral': 1849, 'n_tokens_neox': 1830, 'n_words': 397}