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

Refactor DimensionData Create node to support MCP2 and backward compatible with MCP1 #902

merged 4 commits into from Oct 24, 2016


Copy link

samuelchong commented Oct 13, 2016

Changes Title (replace this with a logical title for your changes)


Refactor create_node for MCP2 to support CaaS API 2.3 feature. You could now specify Network Adapter Name for primary and additional NIC. Parameters in create_node function is tailored for MCP2.

However, this function also allow backward compatibility for MCP1 using kwargs. Code snippet provided in documentation on creating node for MCP1 and MCP2.


  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)
@@ -732,7 +732,8 @@ class DimensionDataServerDisk(object):
A class that represents the disk on a server
def __init__(self, id, scsi_id, size_gb, speed, state):
def __init__(self, id=None, scsi_id=None, size_gb=None, speed=None,

This comment has been minimized.


tonybaloney Oct 20, 2016 Contributor

id should not be optional. I would also argue that none of the other variables should be either?

This comment has been minimized.


samuelchong Oct 20, 2016 Author Contributor

Request for deploy server CaaS API https:///caas/2.3/{org-id}/server/deployServer is requiring scsi_id and speed only.

That's why I make them optional so that I could use this data class for deploy server.

<deployServer xmlns=""> 
      <name>Production FTPS Server</name>
      <description>This is the main FTPS Server</description> 
      <cpu speed="HIGHPERFORMANCE" count="4" coresPerSocket="2"/>      
      <network> <networkId>c550be0e-65c1-11e4-811f-005056806999</networkId>
      <disk scsiId="0" speed="STANDARD"/>
Copy link

tonybaloney commented Oct 24, 2016

Ok. 👍

@asfgit asfgit merged commit fc9c396 into apache:trunk Oct 24, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
asfgit pushed a commit that referenced this pull request Oct 24, 2016
Closes #902
asfgit pushed a commit that referenced this pull request Oct 24, 2016
@samuelchong samuelchong deleted the samuelchong:create_node_mcp2 branch Oct 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.