Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluent flow in VM::DataDisk #717

Closed
anuchandy opened this issue May 18, 2016 · 4 comments
Closed

Fluent flow in VM::DataDisk #717

anuchandy opened this issue May 18, 2016 · 4 comments

Comments

@anuchandy
Copy link
Member

anuchandy commented May 18, 2016

This is a thread for discussing the fluent definition flow for attaching multiple data disks (new/existing) to a virtual machine.

payload:

            "dataDisks": [
                {
                    "lun": 0,
                    "name": "disk1",
                    "createOption": "Empty",
                    "vhd": {
                        "uri": "https://<stg-account1>.blob.core.windows.net/vhds/<new-vhd>.vhd"
                    },
                    "caching": "None" | "ReadOnly" | "ReadWrite",
                    "diskSizeGB": <size>
                },
                {
                    "lun": 1,
                    "name": "disk2",
                    "createOption": "Attach",
                    "vhd": {
                        "uri": "https://<stg-account2>.blob.core.windows.net/vhds/<existing-vhd>.vhd"
                    },
                    "caching": "None" | "ReadOnly" | "ReadWrite",
                    "diskSizeGB": null
                }
            ]

uri: Url to vhd in ANY storage account in the subscription, there is no restriction that disk needs to store in the same account as OS disk. Different data-disk can be stored in different storage accounts. Assuming this helps to maximize the IOPS in the disk.

_Option-1_ [Requires inner class]

grammar1

Grammar1 ::= ( 'withNewDataDisk(size)' | 'withExistingDataDisk(url)' | ( 'defineNewDataDisk(size)' ( 'withLun' | 'withName' | 'withCaching' | 'storeAt' )* | 'defineExistingDataDisk(url)' ( 'withLun' | 'withName' | 'withCaching' )* ) 'attach' )*

_Option-2_ [Inner class not required]

grammar2

Grammar2 ::= ( 'withNewDataDisk(size)' | 'withExistingDataDisk(url)' | ( 'defineNewDataDisk(size)' 'storeAt'? | 'defineExistingDataDisk(url)' ) ( 'withLun' | 'withName' | 'withCaching' )* 'attach' )*

_Option-3_ [Inner class not required]

grammar3

Grammar3 ::= ( 'withNewDataDisk(size)' | 'withExistingDataDisk(url)' | ( 'defineNewDataDisk()' 'withSize(size)' 'storeAt'? | 'defineExistingDataDisk()' 'use(url)' ) ( 'withLun' | 'withName' | 'withCaching' )* 'attach' )*

_Option-4_ [Requires inner class]

grammar4

Grammar4 ::= ( 'withNewDataDisk(size)' | 'withExistingDataDisk(url)' | ( 'defineNewDataDisk()' 'withSize(size)' ( 'withLun' | 'withName' | 'withCaching' | 'storeAt' )* | 'defineExistingDataDisk()' 'use(url)' ( 'withLun' | 'withName' | 'withCaching' )* ) 'attach' )*
@anuchandy
Copy link
Member Author

use(url) -> from(storageAccountName, containerName, vhdName)
define[New|Existing]DataDisk(name)
storeAt(url) -> storeAt(storageAccountName, containerName, vhdName)

@anuchandy
Copy link
Member Author

anuchandy commented May 18, 2016

Team agreed on the following:

grammar3

Grammar3 ::= ( 'withNewDataDisk(size)' | 'withExistingDataDisk(account, container, vhdname)' | ( 'defineNewDataDisk(name)' 'withSize(size)' 'storeAt(account, container, vhdname)'? | 'defineExistingDataDisk(name)' 'from(account, container, vhdname)' ) ( 'withLun' | 'withCaching' )* 'attach' )*

@jianghaolu
Copy link
Contributor

Shall we close this as it's merged?

@anuchandy
Copy link
Member Author

yes, closing

@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants