Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
split public ip addresses pool settings into PaaS and IaaS separately
Browse files Browse the repository at this point in the history
  • Loading branch information
slntopp committed Jun 4, 2021
1 parent 998bb98 commit 1565a8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,13 @@ Environment=GEM_PATH=/usr/local/rvm/gems/ruby-2.5.8:/usr/local/rvm/gems/ruby-2.5
</tr>
<tr>
<td align="left"><strong>PUBLIC_NETWORK_DEFAULTS</strong></td>
<td align="left">NETWORK_ID</td>
<td align="right"><code>Public IPs pool network ID</code></td>
<td align="left">PAAS</td>
<td align="right"><code>Public IPs pool network ID for PaaS</code></td>
</tr>
<tr>
<td align="left"><strong></strong></td>
<td align="left">IAAS</td>
<td align="right"><code>Public IPs pool network ID for IaaS</code></td>
</tr>
<tr>
<td align="left"><strong>VNETS_TEMPLATES</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion core/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
['IAAS_GROUP_ID', 100, "IaaS(VDC) Users group ID", 1, "int"],
['NODES_DEFAULT', "{\"VCENTER\":\"host_id\"}", "Default nodes for different hypervisors", 1, "object"],
['PUBLIC_IP_COST', 0.0, "Public IP Address cost per sec", 0, "float"],
['PUBLIC_NETWORK_DEFAULTS', "{\"NETWORK_ID\":\"network_id\"}", "Default Public Network Pool ID", 1, "object"],
['PUBLIC_NETWORK_DEFAULTS', "{\"IAAS\":\"0\", \"PAAS\": \"0\"}", "Default Public Network Pool IDs for IaaS and PaaS", 1, "object"],
['CURRENCY_MAIN', "€", "Currency", 0, "str"],
['TRAFFIC_COST', 0.0, "Cost of 1 kByte VM traffic", 0, "float"],
['TRAFFIC_BILL_FREQ', 86400, "Frequency of debits for Traffic usage in seconds", 1, "int"],
Expand Down
2 changes: 1 addition & 1 deletion lib/creative_funcs/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def CreateVMwithSpecs(params, trace = ["#{__method__} method called:#{__LINE__}"
trace << "Setting up NICs:#{__LINE__ + 1}"
specs['NIC'] = []
params['ips'].times do
specs['NIC'] << { NETWORK_ID: IONe::Settings['PUBLIC_NETWORK_DEFAULTS']['NETWORK_ID'] }
specs['NIC'] << { NETWORK_ID: IONe::Settings['PUBLIC_NETWORK_DEFAULTS']['PAAS'] }
end

LOG_DEBUG "Resulting capacity template:\n" + specs.debug_out
Expand Down
2 changes: 1 addition & 1 deletion lib/vntools/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class IONe
def reserve_public_ip params
params.to_sym!

vnet = onblock(:vn, IONe::Settings['PUBLIC_NETWORK_DEFAULTS']['NETWORK_ID'], @client)
vnet = onblock(:vn, IONe::Settings['PUBLIC_NETWORK_DEFAULTS']['IAAS'], @client)
vnet.info!

u = onblock(:u, params[:u], @client)
Expand Down

0 comments on commit 1565a8c

Please sign in to comment.