diff --git a/doc/source/user_guide/how_to.rst b/doc/source/user_guide/how_to.rst index f4359868841..4f29a572523 100644 --- a/doc/source/user_guide/how_to.rst +++ b/doc/source/user_guide/how_to.rst @@ -40,13 +40,6 @@ How-tos :text-align: center .. image:: ../images/drawings/remote_machines.png - - .. grid-item-card:: Access Entry and Premium capabilities - :link: user_guide_server_context - :link-type: ref - :text-align: center - - .. image:: ../images/drawings/entry_premium.png .. grid-item-card:: Use DPF XML Files diff --git a/doc/source/user_guide/index.rst b/doc/source/user_guide/index.rst index 87c6cabb664..735387fa974 100644 --- a/doc/source/user_guide/index.rst +++ b/doc/source/user_guide/index.rst @@ -91,7 +91,6 @@ Troubleshooting custom_operators.rst dpf_server.rst server_types.rst - server_context.rst xmlfiles.rst diff --git a/doc/source/user_guide/tutorials/11-licensing/index.rst b/doc/source/user_guide/tutorials/11-licensing/index.rst index 21458718bcd..f645ac674fd 100644 --- a/doc/source/user_guide/tutorials/11-licensing/index.rst +++ b/doc/source/user_guide/tutorials/11-licensing/index.rst @@ -9,13 +9,15 @@ Licensing :margin: 2 .. grid-item-card:: Access Entry and Premium Capabilities - :link: ref_tutorials + :link: user_guide_server_context :link-type: ref :text-align: center - This tutorial + This tutorial explains the DPF server licensing logic .. toctree:: :maxdepth: 2 :hidden: + Access Entry and Premium Capabilities + diff --git a/doc/source/user_guide/server_context.rst b/doc/source/user_guide/tutorials/11-licensing/server_context.rst similarity index 83% rename from doc/source/user_guide/server_context.rst rename to doc/source/user_guide/tutorials/11-licensing/server_context.rst index 04d21830bc9..3c7d9fbc62a 100644 --- a/doc/source/user_guide/server_context.rst +++ b/doc/source/user_guide/tutorials/11-licensing/server_context.rst @@ -44,9 +44,15 @@ Once a DPF Server is started in **Entry** context, it can be upgraded to the .. rst-class:: sphx-glr-script-out - .. code-block:: none - - Server Context of type LicensingContextType.entry with no xml path + .. jupyter-execute:: + :hide-code: + + from ansys.dpf import core as dpf + # start a server with entry capabilities + server = dpf.start_local_server( + context=dpf.AvailableServerContexts.entry + ) + print(server.context) .. code-block:: @@ -56,9 +62,12 @@ Once a DPF Server is started in **Entry** context, it can be upgraded to the .. rst-class:: sphx-glr-script-out - .. code-block:: none - - Server Context of type LicensingContextType.premium with no xml path + .. jupyter-execute:: + :hide-code: + + # apply a premium context on the server + server.apply_context(dpf.AvailableServerContexts.premium) + print(server.context) Change the default server context @@ -77,9 +86,12 @@ with this code: .. rst-class:: sphx-glr-script-out - .. code-block:: none - - Server Context of type LicensingContextType.entry with no xml path + .. jupyter-execute:: + :hide-code: + + from ansys.dpf import core as dpf + dpf.set_default_server_context(dpf.AvailableServerContexts.entry) + print(dpf.server_context.SERVER_CONTEXT) .. warning:: As starting an ``InProcess`` server means linking the DPF binaries to your current Python