added feature for default networking and flexible shapes on create_no… #1277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enhancement to create_notebook_session. Related to FR:1276
This enhancement adds the ability for users to use a flexible shape, by specifying ocpus and memory_in_gbs and also makes subnet_id optional. If no subnet_id is specified the notebook is provisioned with default networking. This has been unit tested locally with my own tenancy with the below tests:
from ads.catalog import notebook
notebook_catalog = NotebookCatalog(compartment_id = "ocid1...")
standard shape, specified subnet
test1 = notebook_catalog.create_notebook_session(display_name='dev-1',project_id='ocid1...',shape="VM.Standard2.1",block_storage_size_in_gbs=50,subnet_id='ocid1...')
standard shape, default netorking
test2 = notebook_catalog.create_notebook_session(display_name='dev-2',project_id='ocid1...',shape="VM.Standard2.1",block_storage_size_in_gbs=50)
flexible shape, specified subnet
test3 = notebook_catalog.create_notebook_session(display_name='dev-3',project_id='ocid1...',shape="VM.Standard.E4.Flex",ocpus = 2,memory_in_gbs = 16,block_storage_size_in_gbs=50,subnet_id='ocid1...')
flexible shape, default networking
test4 = notebook_catalog.create_notebook_session(display_name='dev-4',project_id='ocid1...',shape="VM.Standard.E4.Flex",ocpus = 2,memory_in_gbs = 16,block_storage_size_in_gbs=50)
All four notebook sessions have then been created successfully in my tenancy