get-blueprint

The get-blueprint command displays detailed information on a blueprint from a catalog in json format. What catalog the blueprint is displayed from is determined by one of the options in the order below:

  1. By specifying the --publicCatalog command argument.
  2. By specifying the desired company catalog with the command argument --catalogid
  3. Otherwise the company catalog associated with the customer of the user running the command is used.

Help

get-blueprint -h
usage: get-blueprint [-h] [--catalogid CATALOGID] [--depth DEPTH]
                     [--extractdirectory EXTRACTDIRECTORY]
                     [--geninput GENINPUT] [--publicCatalog]
                     id

positional arguments:
  id                    Blueprint ID

optional arguments:
  -h, --help            show this help message and exit
  --catalogid CATALOGID
                        Catalog ID, defaults to company catalog
  --depth DEPTH         depth of objects to print, default=3
  --extractdirectory EXTRACTDIRECTORY
                        Directory to extract original yaml files to
  --geninput GENINPUT   JSON file to store generated input template for this
                        blueprint
  --publicCatalog       Use public catalog

Note

The get-blueprint command has a --depth parameter which determines how much detail gets displayed. You specify the --depth parameter with a number in the range from 1 to 10 (1 = minimum detail, 10 = maximum detail). The default is 3.

Tip

The get-blueprint command has a --extractdirectory parameter which if specified with a directory path will result in the get-blueprint command creating a template yaml file with the contents of the blueprint from DCM. The “main” template file will have a filename of main.yaml. The get-blueprint command will also generate file(s) for the imports with file names of input_# where # is a sequential number starting at 1

Note

Displaying blueprints requires that the Dell Cloud Manager user (user API key) has the necessary access rights to access blueprints.

Example 1

get-blueprint 15
Loading API environment
  API access validated
  API access key type is User, userId: 10
  Found Customer catalog, id= 11
Defaulting to customer catalog id: 11

 Blueprint: GAF-TEST

{   'actions': {   'blueprin_t_launch': {   'enabled': True,
                                            'name': 'BLUEPRINT_LAUNCH'}},
    'active': True,
    'base64_encoded_icon': 'present (not printed)',
    'blueprint_errors': [],
    'blueprint_id': 15,
    'blueprint_type': 'MULTI_TIER_1',
    'catalog_id': 11,
    'created_by': None,
    'created_date_time': '2015-06-08T17:46:01.787+0000',
    'default_architecture': None,
    'default_platform': None,
    'description': 'Simple Single Machine Blueprint',
    'display_groups': [],
    'groups': [],
    'inputs': [   {   'description': 'Name for the server',
                      'name': 'name',
                      'type': 'STRING'},
                  {   'clouds': [...],
                      'name': 'product_selector',
                      'type': 'PRODUCT'}],
    'long_description': None,
    'name': 'GAF-TEST',
    'path': 'automation/MultiTierBlueprint/15',
    'policy_groups': [],
    'request_details': 'basic',
    'requires_inputs': True,
    'resources': [   {   '@class': 'com.enstratus.catalog.MultiTierBlueprintFirewallDescription',
                         'blueprint_resource_id': 'vm_firewall_rules',
                         'rules': [...],
                         'type': 'FIREWALL'},
                     {   '@class': 'com.enstratus.catalog.MultiTierBlueprintServerDescription',
                         'blueprint_resource_id': 'vm',
                         'product_selector_input': 'product_selector',
                         'type': 'SERVER'}],
    'servers': [   {   '@class': 'com.enstratus.catalog.MultiTierBlueprintServerDescription',
                       'blueprint_resource_id': 'vm',
                       'product_selector_input': 'product_selector',
                       'type': 'SERVER'}],
    'updated_date_time': None,
    'version': '1.00'}

Example 2

Get a copy of the blueprint in a yaml file.

get-blueprint 37 --extractdirectory ./temp
Loading API environment
  API access validated
  API access key type is User, userId: 10
  Found Company catalog, id= 10
Defaulting to Company catalog, id: 10
ls ./temp
input_1.yaml     main.yaml

Note

The get-blueprint command will overwrite files with the same name(s).