def create_test_rsdns_entry(self): """Create an entry using the RsDnsInstanceEntryFactory.""" instance = {'uuid': '000136c0-effa-4711-a747-a5b9fbfcb3bd', 'id': '10'} ip = "10.100.2.7" factory = RsDnsInstanceEntryFactory(dns_domain_id=DNS_DOMAIN_ID) entry = factory.create_entry(instance) entry.content = ip self.driver.create_entry(entry) entries = self.driver.get_entries_by_name(name=entry.name) assert_equal(1, len(entries)) assert_equal(ip, entries[0].content) assert_equal(FLAGS.dns_ttl, entries[0].ttl)
def setUp(self): self.creator = RsDnsInstanceEntryFactory()
def create_driver(self): """Creates the DNS Driver used in subsequent tests.""" self.driver = utils.import_object(FLAGS.dns_driver) self.entry_factory = RsDnsInstanceEntryFactory() self.test_uuid = uuid.uuid4().hex self.new_records = {}