{"id":287,"date":"2010-10-26T15:38:55","date_gmt":"2010-10-26T21:38:55","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=287"},"modified":"2014-11-19T11:25:59","modified_gmt":"2014-11-19T17:25:59","slug":"expect-and-hp-virtual-connect-configuration","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=287","title":{"rendered":"Expect and HP Virtual Connect configuration"},"content":{"rendered":"<p>Perhaps you are more patient than I am or enjoy the HP web interface for virtual connect.\u00a0 I can&#8217;t stand it .\u00a0 It makes me wait too long and when I have multiple chassis chained together creating server profiles takes forever.\u00a0 In fact, I had to create them all then wait.. then find out it was wrong, blow it all away then start over.<\/p>\n<p>So here&#8217;s a little expect script that I wrote that does it all for me.\u00a0 This was done after I created the networks and profiles&#8230; but you can probably add that in as well:<\/p>\n<pre>#!\/usr\/bin\/expect -f\r\nset timeout -1 # the HP stuff takes too long to return!\r\nspawn ssh myname@10.116.1.210\r\nexpect \"*?assword:*\"\r\nsend -- \"secretpassword\\r\"\r\nsend -- \"\\r\"\r\n\r\nfor { set i 1 } { $i &lt; 17 } { incr i 1 } {\r\n  expect \"*-&gt;\"\r\n  send \"set enet-connection oa3blade$i 1 network=oa3flexup1\\r\"\r\n  expect \"*-&gt;\"\r\n  send \"set enet-connection oa3blade$i 2 network=oa3flexup2\\r\"\r\n  expect \"*-&gt;\"\r\n  send \"add enet-connection oa3blade$i network=oa3flexup3\\r\"\r\n  expect \"*-&gt;\"\r\n  send \"add enet-connection oa3blade$i network=oa3flexup4\\r\"\r\n  expect \"*-&gt;\"\r\n  send \"assign profile oa3blade$i enc0:$i\\r\"\r\n\r\n}\r\n<\/pre>\n<p>after doing that I get all my blades configured without having to wait and type it all out.\u00a0 I&#8217;m hopeful that HP allows ranges or something in the future to be able to assign profiles to more than one blade in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Perhaps you are more patient than I am or enjoy the HP web interface for virtual connect.\u00a0 I can&#8217;t stand it .\u00a0 It makes me wait too long and when I have multiple chassis chained together creating server profiles takes forever.\u00a0 In fact, I had to create them all then wait.. then find out it&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[94,95,986],"tags":[104,105],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/287"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287"}],"version-history":[{"count":3,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions\/290"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}