mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +02:00
Add script to convert datastore-indexes.xml to index.yaml
The gcloud datastore cleanup-indexes command takes its input in index.yaml form instead of datastore-indexes.yaml form. This simple translation script allows us to generate one from the other. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169260811
This commit is contained in:
parent
f34d4b6bbb
commit
0994ce76c7
5 changed files with 301 additions and 0 deletions
86
python/google/registry/scripts/testdata/datastore-indexes.xml
vendored
Normal file
86
python/google/registry/scripts/testdata/datastore-indexes.xml
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
<datastore-indexes autoGenerate="false">
|
||||
<!-- For finding contact resources by registrar. -->
|
||||
<datastore-index kind="ContactResource" ancestor="false" source="manual">
|
||||
<property name="currentSponsorClientId" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding domain resources by registrar. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="^i" direction="asc"/>
|
||||
<property name="currentSponsorClientId" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding domain resources by TLD. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="^i" direction="asc"/>
|
||||
<property name="tld" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding domain resources by registrar. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="currentSponsorClientId" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding host resources by registrar. -->
|
||||
<datastore-index kind="HostResource" ancestor="false" source="manual">
|
||||
<property name="currentSponsorClientId" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For finding account balance of registrar and viewing billing history. -->
|
||||
<datastore-index kind="RegistrarBillingEntry" ancestor="true" source="manual">
|
||||
<property name="currency" direction="asc"/>
|
||||
<property name="created" direction="desc"/>
|
||||
</datastore-index>
|
||||
<!-- For determining the active domains linked to a given contact. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="allContacts.contact" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For determining the active domains linked to a given host. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="nsHosts" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For RDAP searches by linked nameserver. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="^i" direction="asc"/>
|
||||
<property name="nsHosts" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For WHOIS IP address lookup -->
|
||||
<datastore-index kind="HostResource" ancestor="false" source="manual">
|
||||
<property name="inetAddresses" direction="asc"/>
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For Poll -->
|
||||
<datastore-index kind="PollMessage" ancestor="false" source="manual">
|
||||
<property name="clientId" direction="asc"/>
|
||||
<property name="eventTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<datastore-index kind="PollMessage" ancestor="true" source="manual">
|
||||
<property name="clientId" direction="asc"/>
|
||||
<property name="eventTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For the history viewer. -->
|
||||
<datastore-index kind="HistoryEntry" ancestor="true" source="manual">
|
||||
<property name="modificationTime" direction="asc"/>
|
||||
</datastore-index>
|
||||
<!-- For RDAP. -->
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="^i" direction="asc"/>
|
||||
<property name="fullyQualifiedDomainName" direction="asc"/>
|
||||
</datastore-index>
|
||||
<datastore-index kind="DomainBase" ancestor="false" source="manual">
|
||||
<property name="^i" direction="asc"/>
|
||||
<property name="tld" direction="asc"/>
|
||||
<property name="fullyQualifiedDomainName" direction="asc"/>
|
||||
</datastore-index>
|
||||
<datastore-index kind="HostResource" ancestor="false" source="manual">
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
<property name="fullyQualifiedHostName" direction="asc"/>
|
||||
</datastore-index>
|
||||
<datastore-index kind="ContactResource" ancestor="false" source="manual">
|
||||
<property name="deletionTime" direction="asc"/>
|
||||
<property name="searchName" direction="asc"/>
|
||||
</datastore-index>
|
||||
</datastore-indexes>
|
93
python/google/registry/scripts/testdata/index.yaml
vendored
Normal file
93
python/google/registry/scripts/testdata/index.yaml
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
indexes:
|
||||
|
||||
- kind: ContactResource
|
||||
properties:
|
||||
- name: currentSponsorClientId
|
||||
- name: deletionTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: ^i
|
||||
- name: currentSponsorClientId
|
||||
- name: deletionTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: ^i
|
||||
- name: tld
|
||||
- name: deletionTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: currentSponsorClientId
|
||||
- name: deletionTime
|
||||
|
||||
- kind: HostResource
|
||||
properties:
|
||||
- name: currentSponsorClientId
|
||||
- name: deletionTime
|
||||
|
||||
- kind: RegistrarBillingEntry
|
||||
ancestor: yes
|
||||
properties:
|
||||
- name: currency
|
||||
- name: created
|
||||
direction: desc
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: allContacts.contact
|
||||
- name: deletionTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: nsHosts
|
||||
- name: deletionTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: ^i
|
||||
- name: nsHosts
|
||||
- name: deletionTime
|
||||
|
||||
- kind: HostResource
|
||||
properties:
|
||||
- name: inetAddresses
|
||||
- name: deletionTime
|
||||
|
||||
- kind: PollMessage
|
||||
properties:
|
||||
- name: clientId
|
||||
- name: eventTime
|
||||
|
||||
- kind: PollMessage
|
||||
ancestor: yes
|
||||
properties:
|
||||
- name: clientId
|
||||
- name: eventTime
|
||||
|
||||
- kind: HistoryEntry
|
||||
ancestor: yes
|
||||
properties:
|
||||
- name: modificationTime
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: ^i
|
||||
- name: fullyQualifiedDomainName
|
||||
|
||||
- kind: DomainBase
|
||||
properties:
|
||||
- name: ^i
|
||||
- name: tld
|
||||
- name: fullyQualifiedDomainName
|
||||
|
||||
- kind: HostResource
|
||||
properties:
|
||||
- name: deletionTime
|
||||
- name: fullyQualifiedHostName
|
||||
|
||||
- kind: ContactResource
|
||||
properties:
|
||||
- name: deletionTime
|
||||
- name: searchName
|
Loading…
Add table
Add a link
Reference in a new issue