<commit_before>package ddcloud

import (
	"fmt"
	"testing"

	"github.com/hashicorp/terraform/helper/resource"
	"github.com/hashicorp/terraform/terraform"
)

/*
 * Acceptance-test configurations.
 */

func testAccDDCloudAntiAffinityRuleBasic() string {
	return `
		provider "ddcloud" {
			region		= "AU"
		}

		resource "ddcloud_networkdomain" "acc_test_domain" {
			name		= "acc-test-networkdomain"
			description	= "Network domain for Terraform acceptance test."
			datacenter	= "AU9"

			plan		= "ADVANCED"
		}

		resource "ddcloud_vlan" "acc_test_vlan" {
			name				= "acc-test-vlan"
			description 		= "VLAN for Terraform acceptance test."

			networkdomain 		= "${ddcloud_networkdomain.acc_test_domain.id}"

			ipv4_base_address	= "192.168.17.0"
			ipv4_prefix_size	= 24
		}

		resource "ddcloud_server" "acc_test_server" {
			count					= 2
			name					= "acc_test_server-${format("%d", count.index + 1)}"
			description 			= "Server ${format("%d", count.index + 1)} for Terraform anti-affinity acceptance test."
			admin_password			= "<PASSWORD>!"

			memory_gb				= 8

			networkdomain 			= "${ddcloud_networkdomain.acc_test_domain.id}"

			primary_adapter {
				vlan				= "${ddcloud_vlan.acc_test_vlan.id}"
				ipv4				= "192.168.17.${count.index + 6}"
			}
			

			dns_primary				= "8.8.8.8"
			dns_secondary			= "8.8.4.4"

			image					= "CentOS 7 64-bit 2 CPU"

			auto_start				= false

			# Image disk
			disk {
				scsi_unit_id     = 0
				size_gb          = 10<commit_msg>Fix broken acceptance test for ddcloud_server_anti_affinity.<commit_after>package ddcloud

import (
	"fmt"
	"testing"

	"github.com/hashicorp/terraform/helper/resource"
	"github.com/hashicorp/terraform/terraform"
)

/*
 * Acceptance-test configurations.
 */

func testAccDDCloudAntiAffinityRuleBasic() string {
	return `
		provider "ddcloud" {
			region		= "AU"
		}

		resource "ddcloud_networkdomain" "acc_test_domain" {
			name		= "acc-test-networkdomain"
			description	= "Network domain for Terraform acceptance test."
			datacenter	= "AU9"

			plan		= "ADVANCED"
		}

		resource "ddcloud_vlan" "acc_test_vlan" {
			name				= "acc-test-vlan"
			description 		= "VLAN for Terraform acceptance test."

			networkdomain 		= "${ddcloud_networkdomain.acc_test_domain.id}"

			ipv4_base_address	= "192.168.17.0"
			ipv4_prefix_size	= 24
		}

		resource "ddcloud_server" "acc_test_server" {
			count					= 2
			name					= "acc_test_server-${format("%d", count.index + 1)}"
			description 			= "Server ${format("%d", count.index + 1)} for Terraform anti-affinity acceptance test."
			admin_password			= "<PASSWORD>!"

			memory_gb				= 8

			networkdomain 			= "${ddcloud_networkdomain.acc_test_domain.id}"

			primary_network_adapter {
				vlan				= "${ddcloud_vlan.acc_test_vlan.id}"
				ipv4				= "192.168.17.${count.index + 6}"
			}
			

			dns_primary				= "8.8.8.8"
			dns_secondary			= "8.8.4.4"

			image					= "CentOS 7 64-bit 2 CPU"

			auto_start				= false

			# Image disk
			disk {
				scsi_unit_id     = 0
				size_gb          = 10
{'fraction_non_alphanumeric': 0.12248266754704523, 'fraction_numerical': 0.028392208649719378, 'mean_word_length': 2.9711664482306683, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '5316076', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1142, 'n_words': 204}