Giter VIP home page Giter VIP logo

hpe3par_cookbook's Introduction

HPE 3PAR Cookbook for Chef

The hpe3par cookbook manages HPE 3PAR storage arrays by using the HPE3PARClient ruby SDK. The HPE3PARClient interacts with the 3PAR storage arrays over http/https through the WSAPI REST service hosted on the array.

This cookbook is not intended to include any recipes. Use it by creating a new cookbook and specifying a dependency on this cookbook in your metadata. Then use any of the resources provided by this cookbook.

Note: The cookbook name is 'hpe3par'. If you want to directly use from source, you need to rename the directory to hpe3par from hpe3par_cookbook in order to use the resources.

Requirements

  • 3PAR OS - 3.2.2MU4, 3.3.1 MU1
  • Ruby - 2.4.1 or higher.
  • Chef - 12.1 or higher.
  • WSAPI service should be enabled on the 3PAR storage array.

Usage

Add the following line to the metadata.rb file of your cookbook

 # my_cookbook/metadata.rb
 ...
 depends 'hpe3par'

Now, you can utilize the hpe3par cookbook resources in your recipes, for ex:

Creating a Virtual Volume

hpe3par_volume node['hpe3par']['virtual_volume']['name'] do
  storage_system node['hpe3par']['storage_system']
  cpg node['hpe3par']['virtual_volume']['cpg']
  size node['hpe3par']['virtual_volume']['size']
  size_unit node['hpe3par']['virtual_volume']['size_unit']
  type node['hpe3par']['virtual_volume']['type']
  action :create
end

HPE 3PAR Connection settings

The connection settings for connecting to a 3PAR array are defined through attributes. Every hpe3ar resource has a storage_system attribute which represents the connection to the 3PAR array. The attribute definition for this is as follows:

node['hpe3par']['storage_system'] = {
    name: 'SRA_205',
    ip: '16.192.67.205',
    user: '3par_user',
    password: 'password'
}

Recipes

These are intended as samples/reference only and can be found in the recipes folder. These recipes list out all of the actions for each resource.

  • hpe3par::clone
  • hpe3par::cpg
  • hpe3par::flash_cache
  • hpe3par::host
  • hpe3par::host_set
  • hpe3par::qos
  • hpe3par::snapshot
  • hpe3par::virtual_volume
  • hpe3par::vlun
  • hpe3par::volume_set

Resources

hpe3par_clone

Actions

  • create_offline: Default action.
  • create_online
  • delete
  • resync
  • stop

Attribute Parameters

  • storage_system: Hash (Required)
  • base_volume_name: String (Required)
  • clone_name: String (Required)
  • dest_cpg: String
  • online: Boolean
  • read_only: Boolean
  • tpvv: Boolean
  • tdvv: Boolean
  • snap_cpg: String
  • skip_zero: Boolean
  • compression: Boolean
  • save_snapshot: Boolean
  • priority: String, Defaults to "MEDIUM".

hpe3par_cpg

Actions

  • create: Default action.
  • delete

Attribute Parameters

  • cpg_name: String (Required)
  • storage_system: Hash (Required)
  • domain: String
  • growth_increment: Float, Defaults to -1.0.
  • growth_increment_unit: String, Defaults to "GiB".
  • growth_limit: Float, Defaults to -1.0.
  • growth_limit_unit: String, Defaults to "GiB".
  • growth_warning: Float, Defaults to -1.0.
  • growth_warning_unit: String, Defaults to "GiB".
  • raid_type: String
  • set_size: Integer, Defaults to -1.
  • high_availability: String
  • disk_type: String

hpe3par_flash_cache

Actions

  • create: Default action.
  • delete

Attribute Parameters

  • storage_system: Hash (Required)
  • size_in_gib: Integer (Required)
  • mode: Integer

hpe3par_host

Actions

  • create: Default action.
  • add_fc_path_to_host
  • add_initiator_chap
  • add_iscsi_path_to_host
  • add_target_chap
  • delete
  • modify
  • remove_fc_path_from_host
  • remove_initiator_chap
  • remove_iscsi_path_from_host
  • remove_target_chap

Attribute Parameters

  • storage_system: Hash (Required)
  • host_name: String (Required)
  • domain: String, Defaults to nil.
  • fc_wwns: Array, Defaults to nil.
  • iscsi_names: Array, Defaults to nil.
  • persona: String
  • new_name: String, Defaults to nil.
  • force_path_removal: Boolean, Defaults to nil.
  • chap_name: String, Defaults to nil.
  • chap_secret: String, Defaults to nil.
  • chap_secret_hex: Boolean, Defaults to nil.

hpe3par_host_set

Actions

  • create: Default action.
  • add_host
  • delete
  • remove_host

Attribute Parameters

  • storage_system: Hash (Required)
  • host_set_name: String (Required)
  • domain: String, Defaults to nil.
  • setmembers: Array, Defaults to nil.

hpe3par_qos

Actions

  • create: Default action.
  • delete
  • modify

Attribute Parameters

  • storage_system: Hash (Required)
  • qos_target_name: String (Required)
  • type: String
  • priority: String, Defaults to "LOW".
  • bwmin_goal_kb: Integer, Defaults to -1.
  • bwmax_limit_kb: Integer, Defaults to -1.
  • iomin_goal: Integer, Defaults to -1.
  • iomax_limit: Integer, Defaults to -1.
  • bwmin_goal_op: String
  • bwmax_limit_op: String
  • iomin_goal_op: String
  • iomax_limit_op: String
  • latency_goal: Integer
  • default_latency: Boolean, Defaults to false.
  • enable: Boolean, Defaults to false.
  • latency_goal_usecs: Integer

hpe3par_snapshot

Actions

  • create: Default action.
  • delete
  • modify
  • restore_offline
  • restore_online

Attribute Parameters

  • storage_system: Hash (Required)
  • snapshot_name: String (Required)
  • base_volume_name: String
  • read_only: Boolean
  • expiration_time: Integer
  • retention_time: Integer
  • expiration_unit: String, Defaults to "Hours".
  • retention_unit: String, Defaults to "Hours".
  • expiration_hours: Integer, Defaults to 0.
  • retention_hours: Integer, Defaults to 0.
  • online: Boolean
  • priority: String, Defaults to "MEDIUM".
  • allow_remote_copy_parent: Boolean
  • new_name: String
  • snap_cpg: String
  • rm_exp_time: Boolean

hpe3par_virtual_volume

Actions

  • create: Default action.
  • change_snap_cpg
  • change_user_cpg
  • convert_type
  • delete
  • grow
  • modify
  • set_snap_cpg

Attribute Parameters

  • storage_system: Hash (Required)
  • volume_name: String (Required)
  • cpg: String
  • size: Float
  • size_unit: String, Defaults to "GiB".
  • type: String, Defaults to "thin".
  • snap_cpg: String
  • compression: Boolean, Defaults to false.
  • keep_vv: String
  • new_name: String
  • wait_for_task_to_end: Boolean, Defaults to false.
  • ss_spc_alloc_warning_pct: Integer, Defaults to 0.
  • ss_spc_alloc_limit_pct: Integer, Defaults to 0.
  • rm_ss_spc_alloc_warning: Boolean, Defaults to false.
  • usr_spc_alloc_warning_pct: Integer, Defaults to 0.
  • usr_spc_alloc_limit_pct: Integer, Defaults to 0.
  • rm_usr_spc_alloc_warning: Boolean, Defaults to false.
  • expiration_hours: Integer, Defaults to 0.
  • retention_hours: Integer, Defaults to 0.
  • rm_exp_time: Boolean, Defaults to false.
  • rm_ss_spc_alloc_limit: Boolean, Defaults to false.
  • rm_usr_spc_alloc_limit: Boolean, Defaults to false.

hpe3par_vlun

Actions

  • export_volume_to_host: Default action.
  • export_volume_to_hostset
  • export_volumeset_to_host
  • export_volumeset_to_hostset
  • unexport_volume_to_host
  • unexport_volume_to_hostset
  • unexport_volumeset_to_host
  • unexport_volumeset_to_hostset

Attribute Parameters

  • storage_system: Hash (Required)
  • volume_name: String (Required)
  • lunid: Integer
  • volumeset_name: String
  • hostset_name: String
  • host_name: String
  • node_val: Integer
  • slot: Integer
  • card_port: Integer
  • autolun: Boolean, Defaults to true.

hpe3par_volume_set

Actions

  • create: Default action.
  • add_volume
  • delete
  • remove_volume

Attribute Parameters

  • storage_system: Hash (Required)
  • volume_set_name: String (Required)
  • domain: String
  • setmembers: Array

Feature Requests

If you have a need that is not met by the current implementation, please let us know by creating a new issue.

How to contribute

  1. Fork the repository on Github
  2. Create a named feature branch (like add_resource_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

Note: HPE reserves the right to reject changes do not fit the scope of this project, so for feature additions, please open an issue to discuss your ideas before doing the work.

License

This project is licensed under the Apache 2.0 license. Please see LICENSE for more info

Maintainer: Hewlett Packard Enterprise ([email protected])

hpe3par_cookbook's People

Contributors

farhan-nomani avatar gautamphegde avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.