Domains plugin¶
Note
The internet domain name feature is only included in Fleio Full Edition (OpenStack + Hosting Billing) and Fleio Hosting Billing Edition.
The Domains Fleio plugin adds domain name registration and management functionality to Fleio. The plugins allow you to register and manage domain names, define what TLDs are supported and define registrars to be used for registration and management of domain names. Fleio includes modules for the following registrar APIs:
Openprovider
Reseller Club
Rotld
Registrars¶
First step in using Domains plugin is to configure registrars. The registrars can be configured from staff panel by accessing Domains/Registrars menu.
In this page you can also edit the internet domain name registrars:
To add a new registrar click the plus button on the bottom of the page. When adding a registrar you need to choose a registrar connector. The Domains plugin provides several registrar connectors that can be used:
In order to edit a registrar, you will have to click on the grey pencil, which will open the following edit dialog:
Once you made the changes you wanted you can hit save and the registrar will be saved.
On both add and edit dialogs you can configure domain refresh settings for domains associated with the registrar. If refresh is not available for a registrar then the settings will be disabled and a warning will be displayed.
If you want to delete a registrar click the Delete
button on registrar actions. A confirmation dialog will be
displayed:
Clicking the Delete
button will delete the registrar.
When you define a registrar you will have to select a registrar connector. Fleio supports the following connectors:
TODO registrar connector¶
The TODO registrar connector will add TODOs when an action for a domain is executed. This connector required TODO plugin to be installed and enabled in order to work
Openprovider registrar connector¶
The Openprovider registrar connector will execute domain action using Openprovider registrar. In order to use this connector a valid configuration must be specified in settings.py.
Reseller Club registrar connector¶
The Reseller Club registrar connector will execute domain action using Reseller Club registrar. In order to use this connector a valid configuration must be specified in settings.py.
RoTLD registrar connector¶
The RoTLD registrar connector will execute domain action using RoTLD registrar. In order to use this connector a valid configuration must be specified in settings.py.
TLDs¶
Create a new TLD¶
In order to be able to register, transfer or renew domains you need to configure TLDs and define prices for domains. E.g. if you want to allow .com domains ordering you should define a TLD named .com and then click on it to edit pricing. TLDs can be managed by accessing Domains/TLDs menu in the staff panel.
In this page you can edit the TLDs:
To add a new TLD click the plus button on the bottom of the page. When adding a TLD you need to specify a valid top level domain name, including the dot:
Delete a TLD¶
If you want to delete a TLD click the Delete
button on TLD actions. A confirmation dialog will be displayed:
Clicking the Delete
button will delete the TLD.
If you click on a TLD you will be redirected to the TLD details page where you can edit domain name registration prices, domain name addons prices, change registrar settings, see cost prices and custom fields.
TLD pricing¶
On the pricing tab in TLD details you can change registration prices for the domain name:
In order to ease the price defining you can autofill prices and use relative prices for non default currencies.
Once you are done editing you can click the Save prices
button to save the prices.
On the addons pricing tab in TLD details you can change addons prices for the domain name:
In order to ease the price defining you can autofill prices and use relative prices for non default currencies.
Once you are done editing you can click the Save addons prices
button to save the prices.
On the registrar tab you can select the default registrar and specify if EPP code is needed in order to transfer domains for this TLD:
Once you are done you can click Save registrars
button to save your changes.
On the cost pricing tab you can see the actual price you will pay for the domains with this TLD for various operations:
TLD custom fields¶
On the custom fields tab you can see the custom fields required on client or domain contact in order to be able to register a domain with this TLD:
The custom fields needed for domains registrations for specific TLDs are defined in
plugins/domains/custom_fields/config
folder in two .json
files:
default_custom_fields.config.json
- this file is delivered with Fleio and contains default custom fields definitions - this file should not be modified since it will be overridden each time you upgrade fleiocustom_fields.config.json
- this file should be created if you want to define additional custom fields or change existing ones
When custom fields are loaded Fleio will first load definitions from default_custom_fields.config.json
then if
custom_fields.config.json
file exists will load definitions from that file too and merge/override default
definitions.
Custom fields for TLDs are based on :doc:/configuring/clients-custom-fields
section, but they have been extended to
support custom validation and have two new settings:
required_for_domain
- allows you to mark a custom field as required for domain registration purposesvalidator
- allows you to specify a python function to be used for field validation - the function must be importable from Fleio
Domains¶
Domains can be managed either from staff panel or from user panel by accessing Domains/Domains menu.
A staff user will see all domains and will be able to delete or edit domains and also will usually have more options available to manage a domain compared to an end-user.
An end-user only has access to his domains and has fewer options available.
Domains cannot be added directly, in order to add a domain the end-user will have to place an order to either register or transfer a domain. Once the order is placed the domain will appear in Domains/Domain
Staff can delete domains. When you click delete button on domain actions the delete dialog will be displayed:
Clicking Delete
button will delete the domain. Note that if you have “Suspend instead of terminate” option active,
the domain will be set to the canceled
state.
Staff can also edit a domain. When you click edit button on domain actions the edit domain dialog will be displayed:
if you want to change domain name it will have to have the same TLD. Once you are done editing you can click
Save domain
button to save changes.
Clicking on a domain will open the domain details page. Several tabs are present on domain details page.
The general tab will show you info about the domain and allow you to perform domain actions based on current domain status. In staff panel you will be able to perform more action and also change the registrar for domain.
The nameservers tab will allow you to edit the nameservers for the domain. This only works if the domain is in your Openprovider/ResellerClub account
The whois information tab will allow you to edit whois information for the domain if available.
Registering a domain as end-user¶
To register a domain the end-user must access Domains/Register domain menu, check if the domain is available, fill up the required data and then add the domain to cart and place an order:
Registering a domain as staff¶
In order to register a domain as staff, you will first have to select the client that you want to register the domain for. Next step is to check if the domain is available, fill up the required data then register the domain.
This will create a new order on the selected client.
The next step will be to go to Domains/Domains menu, select the domain that is with the Pending
status
and register it. For this you will have to select the proper registrar and use the REGISTER
action.
Note that the Register
action will not show up until you will select a registrar.
After you register the domain you should see other available actions, such as:
Renew
Get EPP code
Activate registrar lock
Deactivate registrar lock
Request delete
Transfer a domain¶
To transfer a domain the end-user must access Domains/Transfer domain menu, check if the domain is available, fill up the required data and then add the domain to cart and place an order.
For the staff user the transfer domain operation will not check for availability and once you fill up all the data a
Place order
button will be available that will create an order with the selected domain.
Domain statuses¶
The following is a list of domain statuses available in Fleio:
Pending - A domain has been ordered by a client, and it is awaiting provisioning.
Pending Registration - Domain registration has been initiated, however no confirmation has been received yet from the registrar.
Pending delete - Domain deletion has been initiated, however no confirmation has been received yet from the registrar.
Pending transfer - Domain transfer has been initiated, however no confirmation has been received yet from the registrar.
Active - Domain has been registered and is available for management.
Grace - Domain is expired, but is not yet pass the renewal grace period of the registrar.
Redemption - Domain is expired, but is not yet pass the redemption grace period of the registrar.
Expired - Domain is expired.
Transferred away - Domain was transferred away to another registrar.
Canceled - Domain registration was canceled.
Deleted - Domain was deleted.
Fraud - Domain was marked as fraud.
Suspended - Domain was suspended.
Failed registration - Domain registration failed.
Domains plugin configuration options¶
The Domains plugin can be enabled/disabled via feature toggle and has some configurations options that can be
set in settings.py
file.
Feature configuration¶
In order for the plugin to be enabled and visible in UI both plugins
and plugins.domains
features should
be set to True
. This should be done for both staff and end-user.
Registrar connectors configuration¶
In order for Openprovider and Reseller Club connector to work you need to configure them in settings.py file.
The configuration should look like below - just replace
REGISTRARS = {
'resellerclub': {
'test': True,
'auth_userid': '<user>',
'api_key': '<key>'
},
'openprovider': {
'membership_cost': '0.00',
'user_id': '<user>',
'access_hash': '<key>',
}
}
Add custom fields mapping for OpenProvider¶
Fleio custom fields are named differently than client additional data from OpenProvider. There is a default field mapping between client custom field names in Fleio and those from OpenProvider which is used when submitting client data to OpenProvider. You can inspect it by running:
fleio bash cat plugins/domains/registrars_connectors/fieldmap/openprovider.config.json
You can also add an openprovider.user.config.json
JSON file in /plugins/domains/registrars_connectors/fieldmap
directory with your custom mapping that will override the default one mentioned above. This file won’t be overwritten
on upgrades. You must follow the same structure as in the openprovider.config.json
JSON file, which is a list of
dictionaries where you specify the corresponding TLDs and field mapping, for example:
[
{
"tlds": ".ro, .arts.ro, .co.ro, .com.ro, .firm.ro, .info.ro, .nom.ro, .nt.ro, .org.ro, .rec.ro",
"mapping": {
"socialSecurityNumber": "rocnp",
"companyRegistrationNumber": "roregistrationnumber"
}
},
]
You can also map field names based on other field’s value, for example:
[
{
"tlds": ".sg, .com.sg, .edu.sg, .net.sg, .org.sg, .per.sg",
"mapping": {
"sgtldregtype": {
"Individual": {
"socialSecurityNumber": "sgtldrcbid"
},
"Organisation": {
"companyRegistrationNumber": "sgtldrcbid"
}
}
}
}
]
Domains plugin settings¶
The Domains plugin has some configurable settings that can be edited when editing client configurations by accessing Setting/Configurations menu. Right now you can configure the domain options, the default TLD and the default nameservers to be used for domain names registration.
Domain options¶
The domain options will allow you to enable domain registration and domain transfer for clients that have the selected configuration.
Default TLD¶
The default TLD option will allow you to select the pre-defined TLD that will show when opening the domain register form.
Default nameservers¶
The default nameservers will allow you to configure up to 4 nameservers which will be used to register a domain with no nameservers configured at the register order.
How to import TLD pricing from CSV¶
In order to make the TLD pricing configuration easier, we have added a script that allows you to import the domain prices from a .csv file.
Below you can find an example of a CSV file that can be used for import:
"TLD","action","currency","1year","2year","3year","4year","5year","6year","7year","8year","9year","10year"
".com","register","EUR","2.00","2.00","3.00","4.00","5.00","6.00","7.00","8.00","9.00","10.00"
".com","transfer","EUR","1.00","2.20","3.20","4.20","5.20","6.20","7.20","8.20","9.00","10.00"
".com","renew","EUR","1.00","2.00","3.00","4.00","5.00","6.00","1.11","10.00","0.11","10.00"
".ro","register","EUR","1.00","2.00","3.00","4.00","5.00","6.00","7.00","8.00","9.00","10.00"
".ro","transfer","EUR","1.00","2.20","3.20","4.20","5.20","6.20","7.20","8.20","9.00","10.00"
".ro","renew","EUR","1.00","2.00","3.00","4.00","5.00","6.00","1.11","10.00","0.11","10.00"
Create or copy the domains.csv
file in /home/fleio/compose, and run the following cmds to mount the file inside the
utils container:
cd /home/fleio/compose
docker compose run \
-v /home/fleio/compose/domains.csv:/var/webapps/fleio/project/domains.csv \
--rm utils bash
Then, you can run the domains import script:
. ../env/bin/activate
python /var/webapps/fleio/project/plugins/domains/bin/import_tld_pricing.py -f domains.csv
The script takes the following arguments:
-f
or--filepath
this will be the full path to your csv file--skip-relative-prices
this will skip the relative prices when importing the TLD prices