Chef検証(6) レシピ作成 (Vlan Interface適用)

## VLAN 適用

- E1/10 に VLAN100 を適用するレシピを作成。
    - レシピを変更/作成したら都度 Upload が必要です。

```
# レシピ

inohana@ino-ubuntu:~/chef-repo/cookbooks/cisco-cookbook/recipes$ vi cisco_interface

inohana@ino-ubuntu:~/chef-repo/cookbooks/cisco-cookbook/recipes$ cat cisco_interface.rb

cisco_interface 'Ethernet1/20' do
  action :create
  access_vlan 200
  shutdown false
  switchport_mode 'access'
  switchport_vtp true
end

# Cookbook を Upload

inohana@ino-ubuntu:~/chef-repo$ knife cookbook upload cisco-cookbook                           Uploading cisco-cookbook [1.1.2]
Uploaded 1 cookbook.

# レシピを実行

inohana@ino-ubuntu:~/chef-repo$ knife ssh name:chefn9k "sudo chef-client -o 'recipe[cisco-cookbook::cisco_interface]'" -x chefuser01 -p 2222

chefn9k [2017-03-14T07:21:44+00:00] WARN: Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support.
chefn9k [2017-03-14T07:21:44+00:00] INFO: Forking chef instance to converge...
chefn9k Starting Chef Client, version 12.19.33
chefn9k [2017-03-14T07:21:44+00:00] INFO: *** Chef 12.19.33 ***
chefn9k [2017-03-14T07:21:44+00:00] INFO: Platform: x86_64-linux
chefn9k [2017-03-14T07:21:44+00:00] INFO: Chef-client pid: 8181
chefn9k [2017-03-14T07:21:46+00:00] WARN: Run List override has been provided.
chefn9k [2017-03-14T07:21:46+00:00] WARN: Original Run List: []
chefn9k [2017-03-14T07:21:46+00:00] WARN: Overridden Run List: [recipe[cisco-cookbook::cisco_interface]]
chefn9k [2017-03-14T07:21:46+00:00] INFO: Run List is [recipe[cisco-cookbook::cisco_interface]]
chefn9k [2017-03-14T07:21:46+00:00] INFO: Run List expands to [cisco-cookbook::cisco_interface]
chefn9k [2017-03-14T07:21:46+00:00] INFO: Starting Chef Run for chefn9k
chefn9k [2017-03-14T07:21:46+00:00] INFO: Running start handlers
chefn9k [2017-03-14T07:21:46+00:00] INFO: Start handlers complete.
chefn9k [2017-03-14T07:21:46+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:21:46+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:21:46+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ino-ubuntu.iselab.local/organizations/ise/data-collector Exception: 404 -- 404 "Not Found"  (This is normal if you do not have Chef Automate)
chefn9k resolving cookbooks for run list: ["cisco-cookbook::cisco_interface"]
chefn9k [2017-03-14T07:21:46+00:00] INFO: Loading cookbooks [cisco-cookbook@1.1.2]
chefn9k [2017-03-14T07:21:46+00:00] INFO: Skipping removal of obsoleted cookbooks from the cache
chefn9k Synchronizing Cookbooks:
chefn9k [2017-03-14T07:21:46+00:00] INFO: Storing updated cookbooks/cisco-cookbook/recipes/cisco_interface.rb in the cache.
chefn9k   - cisco-cookbook (1.1.2)
chefn9k Installing Cookbook Gems:
chefn9k Compiling Cookbooks...
chefn9k Converging 1 resources
chefn9k Recipe: cisco-cookbook::cisco_interface
chefn9k   * cisco_interface[ethernet1/20] action create[2017-03-14T07:21:46+00:00] INFO: Processing cisco_interface[ethernet1/20] action create (cisco-cookbook::cisco_interface line 1)
chefn9k [2017-03-14T07:21:46+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:21:47+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:21:47+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:21:47+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k
chefn9k     - update access_vlan '1' => '200'[2017-03-14T07:21:47+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:21:48+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k
chefn9k     ================================================================================
chefn9k     Error executing action `create` on resource 'cisco_interface[ethernet1/20]'
chefn9k     ================================================================================
chefn9k
chefn9k     RuntimeError
chefn9k     ------------
chefn9k     [ethernet1/20] ' vtp' : Service not enabled
chefn9k
chefn9k     Cookbook Trace:
chefn9k     ---------------
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/interface.rb:794:in `rescue in switchport_vtp='
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/interface.rb:790:in `switchport_vtp='
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:87:in `block (3 levels) in generic_prop_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:85:in `block (2 levels) in generic_prop_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:65:in `instance_eval'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:65:in `block in generic_prop_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:64:in `each'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/cisco_cmn_utils.rb:64:in `generic_prop_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/libraries/provider_cisco_interface.rb:56:in `prop_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/libraries/provider_cisco_interface.rb:135:in `set_layer2_properties'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/libraries/provider_cisco_interface.rb:81:in `action_create'
chefn9k
chefn9k     Resource Declaration:
chefn9k     ---------------------
chefn9k     # In /var/chef/cache/cookbooks/cisco-cookbook/recipes/cisco_interface.rb
chefn9k
chefn9k       1: cisco_interface 'Ethernet1/20' do
chefn9k       2:   action :create
chefn9k       3:   access_vlan 200
chefn9k       4:   shutdown false
chefn9k       5:   switchport_mode 'access'
chefn9k       6:   switchport_vtp true
chefn9k       7: end
chefn9k
chefn9k     Compiled Resource:
chefn9k     ------------------
chefn9k     # Declared in /var/chef/cache/cookbooks/cisco-cookbook/recipes/cisco_interface.rb:1:in `from_file'
chefn9k
chefn9k     cisco_interface("ethernet1/20") do
chefn9k       action [:create]
chefn9k       retries 0
chefn9k       retry_delay 2
chefn9k       default_guard_interpreter :default
chefn9k       declared_type :cisco_interface
chefn9k       cookbook_name "cisco-cookbook"
chefn9k       recipe_name "cisco_interface"
chefn9k       access_vlan 200
chefn9k       switchport_mode "access"
chefn9k       switchport_vtp true
chefn9k       switchport_trunk_allowed_vlan "1-4094"
chefn9k       switchport_trunk_native_vlan 1
chefn9k     end
chefn9k
chefn9k     Platform:
chefn9k     ---------
chefn9k     x86_64-linux
chefn9k
chefn9k [2017-03-14T07:21:48+00:00] INFO: Running queued delayed notifications before re-raising exception
chefn9k
chefn9k Running handlers:
chefn9k [2017-03-14T07:21:48+00:00] ERROR: Running exception handlers
chefn9k Running handlers complete
chefn9k [2017-03-14T07:21:48+00:00] ERROR: Exception handlers complete
chefn9k Chef Client failed. 0 resources updated in 03 seconds
chefn9k [2017-03-14T07:21:48+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
chefn9k [2017-03-14T07:21:48+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
chefn9k [2017-03-14T07:21:48+00:00] ERROR: cisco_interface[ethernet1/20] (cisco-cookbook::cisco_interface line 1) had an error: RuntimeError: [ethernet1/20] ' vtp' : Service not enabled
chefn9k [2017-03-14T07:21:48+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
inohana@ino-ubuntu:~/chef-repo$
```

- Interface E1/20 に Vlan200 がアサインされました。

## VLAN 削除

- Interface E1/20 の設定をクリアします。

```

# Destroyレシピを作ってみる

inohana@ino-ubuntu:~/chef-repo/cookbooks/cisco-cookbook/recipes$ cat cisco_interface_del.rb
cisco_interface 'Ethernet1/20' do
  action :destroy
end

# 実行結果

switch(config-if)# sh int status

# 消えてねえ！
--------------------------------------------------------------------------------
Port          Name               Status    Vlan      Duplex  Speed   Type
--------------------------------------------------------------------------------
mgmt0         --                 connected routed    full    100     --
Eth1/1        --                 connected 1         full    10G     SFP-H10GB-CU1M
Eth1/2        --                 connected 1         full    1000    1000base-T
Eth1/3        --                 xcvrAbsen trunk     auto    auto    --
Eth1/4        --                 xcvrAbsen 1         auto    auto    --
Eth1/5        --                 xcvrAbsen 1         auto    auto    --
Eth1/6        --                 xcvrAbsen 1         auto    auto    --
略
Eth1/20       --                 xcvrAbsen 200       auto    auto    --
```
- Interface から Vlan の定義を削除する際「destroy」は使えません。
- 内部的に no interface をしているようです。
- そのため、Default Vlan である Vlan1 に上書きすることで Interface の Vlan を削除するとみなします。

```
inohana@ino-ubuntu:~/chef-repo$ knife ssh name:chefn9k "sudo chef-client -o 'recipe[cisco-cookbook::cisco_interface_del]'" -x chefuser01 -p 2222
chefn9k [2017-03-14T07:42:31+00:00] WARN: Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support.
chefn9k [2017-03-14T07:42:32+00:00] INFO: Forking chef instance to converge...
chefn9k Starting Chef Client, version 12.19.33
chefn9k [2017-03-14T07:42:32+00:00] INFO: *** Chef 12.19.33 ***
chefn9k [2017-03-14T07:42:32+00:00] INFO: Platform: x86_64-linux
chefn9k [2017-03-14T07:42:32+00:00] INFO: Chef-client pid: 9168
chefn9k [2017-03-14T07:42:33+00:00] WARN: Run List override has been provided.
chefn9k [2017-03-14T07:42:33+00:00] WARN: Original Run List: []
chefn9k [2017-03-14T07:42:33+00:00] WARN: Overridden Run List: [recipe[cisco-cookbook::cisco_interface_del]]
chefn9k [2017-03-14T07:42:33+00:00] INFO: Run List is [recipe[cisco-cookbook::cisco_interface_del]]
chefn9k [2017-03-14T07:42:33+00:00] INFO: Run List expands to [cisco-cookbook::cisco_interface_del]
chefn9k [2017-03-14T07:42:33+00:00] INFO: Starting Chef Run for chefn9k
chefn9k [2017-03-14T07:42:33+00:00] INFO: Running start handlers
chefn9k [2017-03-14T07:42:33+00:00] INFO: Start handlers complete.
chefn9k [2017-03-14T07:42:33+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:42:33+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:42:33+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ino-ubuntu.iselab.local/organizations/ise/data-collector Exception: 404 -- 404 "Not Found"  (This is normal if you do not have Chef Automate)
chefn9k resolving cookbooks for run list: ["cisco-cookbook::cisco_interface_del"]
chefn9k [2017-03-14T07:42:33+00:00] INFO: Loading cookbooks [cisco-cookbook@1.1.2]
chefn9k [2017-03-14T07:42:33+00:00] INFO: Skipping removal of obsoleted cookbooks from the cache
chefn9k Synchronizing Cookbooks:
chefn9k [2017-03-14T07:42:33+00:00] INFO: Storing updated cookbooks/cisco-cookbook/recipes/cisco_interface_del.rb in the cache.
chefn9k   - cisco-cookbook (1.1.2)
chefn9k Installing Cookbook Gems:
chefn9k Compiling Cookbooks...
chefn9k Converging 1 resources
chefn9k Recipe: cisco-cookbook::cisco_interface_del
chefn9k   * cisco_interface[ethernet1/20] action destroy[2017-03-14T07:42:34+00:00] INFO: Processing cisco_interface[ethernet1/20] action destroy (cisco-cookbook::cisco_interface_del line 1)
chefn9k [2017-03-14T07:42:34+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:42:34+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:42:34+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k
chefn9k
chefn9k     ================================================================================
chefn9k     Error executing action `destroy` on resource 'cisco_interface[ethernet1/20]'
chefn9k     ================================================================================
chefn9k
chefn9k     Cisco::CliError
chefn9k     ---------------
chefn9k     CliError: 'no interface ethernet1/20' rejected with message:
chefn9k     'Invalid range'
chefn9k
chefn9k     Cookbook Trace:
chefn9k     ---------------
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/node.rb:266:in `rescue in config'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/node.rb:263:in `config'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/node.rb:161:in `config_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/node_util.rb:58:in `config_set'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/cisco_node_utils-1.2.0/lib/cisco_node_utils/interface.rb:65:in `destroy'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/libraries/provider_cisco_interface.rb:144:in `block in action_destroy'
chefn9k     /var/chef/cache/cookbooks/cisco-cookbook/libraries/provider_cisco_interface.rb:143:in `action_destroy'
chefn9k
chefn9k     Resource Declaration:
chefn9k     ---------------------
chefn9k     # In /var/chef/cache/cookbooks/cisco-cookbook/recipes/cisco_interface_del.rb
chefn9k
chefn9k       1: cisco_interface 'Ethernet1/20' do
chefn9k       2:   action :destroy
chefn9k       3: end
chefn9k
chefn9k     Compiled Resource:
chefn9k     ------------------
chefn9k     # Declared in /var/chef/cache/cookbooks/cisco-cookbook/recipes/cisco_interface_del.rb:1:in `from_file'
chefn9k
chefn9k     cisco_interface("ethernet1/20") do
chefn9k       action [:destroy]
chefn9k       retries 0
chefn9k       retry_delay 2
chefn9k       default_guard_interpreter :default
chefn9k       declared_type :cisco_interface
chefn9k       cookbook_name "cisco-cookbook"
chefn9k       recipe_name "cisco_interface_del"
chefn9k     end
chefn9k
chefn9k     Platform:
chefn9k     ---------
chefn9k     x86_64-linux
chefn9k
chefn9k [2017-03-14T07:42:34+00:00] INFO: Running queued delayed notifications before re-raising exception
chefn9k
chefn9k Running handlers:
chefn9k [2017-03-14T07:42:34+00:00] ERROR: Running exception handlers
chefn9k Running handlers complete
chefn9k [2017-03-14T07:42:34+00:00] ERROR: Exception handlers complete
chefn9k Chef Client failed. 0 resources updated in 02 seconds
chefn9k [2017-03-14T07:42:34+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
chefn9k [2017-03-14T07:42:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
chefn9k [2017-03-14T07:42:34+00:00] ERROR: CliError: 'no interface ethernet1/20' rejected with message:
chefn9k 'Invalid range'
chefn9k [2017-03-14T07:42:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
inohana@ino-ubuntu:~/chef-repo$
```

- 再度Interface Vlan 適用解除

```
# Vlan1 で上書きするレシピ

inohana@ino-ubuntu:~/chef-repo/cookbooks/cisco-cookbook/recipes$ cat cisco_interface_del.rb
cisco_interface 'Ethernet1/20' do
  action :create
  access_vlan 1
  shutdown false
  switchport_mode 'access'
end
inohana@ino-ubuntu:~/chef-repo/cookbooks/cisco-cookbook/recipes$

# Upload

inohana@ino-ubuntu:~/chef-repo$ knife cookbook upload cisco-cookbook                           Uploading cisco-cookbook [1.1.2]
Uploaded 1 cookbook.

# レシピ実行

inohana@ino-ubuntu:~/chef-repo$ knife ssh name:chefn9k "sudo chef-client -o 'recipe[cisco-cookbook::cisco_interface_del]'" -x chefuser01 -p 2222
chefn9k [2017-03-14T07:49:00+00:00] WARN: Please install an English UTF-8 locale for Chef to use, falling back to C locale and disabling UTF-8 support.
chefn9k [2017-03-14T07:49:01+00:00] INFO: Forking chef instance to converge...
chefn9k Starting Chef Client, version 12.19.33
chefn9k [2017-03-14T07:49:01+00:00] INFO: *** Chef 12.19.33 ***
chefn9k [2017-03-14T07:49:01+00:00] INFO: Platform: x86_64-linux
chefn9k [2017-03-14T07:49:01+00:00] INFO: Chef-client pid: 9415
chefn9k [2017-03-14T07:49:02+00:00] WARN: Run List override has been provided.
chefn9k [2017-03-14T07:49:02+00:00] WARN: Original Run List: []
chefn9k [2017-03-14T07:49:02+00:00] WARN: Overridden Run List: [recipe[cisco-cookbook::cisco_interface_del]]
chefn9k [2017-03-14T07:49:02+00:00] INFO: Run List is [recipe[cisco-cookbook::cisco_interface_del]]
chefn9k [2017-03-14T07:49:02+00:00] INFO: Run List expands to [cisco-cookbook::cisco_interface_del]
chefn9k [2017-03-14T07:49:02+00:00] INFO: Starting Chef Run for chefn9k
chefn9k [2017-03-14T07:49:02+00:00] INFO: Running start handlers
chefn9k [2017-03-14T07:49:02+00:00] INFO: Start handlers complete.
chefn9k [2017-03-14T07:49:02+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:49:02+00:00] INFO: HTTP Request Returned 404 Not Found:
chefn9k [2017-03-14T07:49:02+00:00] INFO: Error while reporting run start to Data Collector. URL: https://ino-ubuntu.iselab.local/organizations/ise/data-collector Exception: 404 -- 404 "Not Found"  (This is normal if you do not have Chef Automate)
chefn9k resolving cookbooks for run list: ["cisco-cookbook::cisco_interface_del"]
chefn9k [2017-03-14T07:49:03+00:00] INFO: Loading cookbooks [cisco-cookbook@1.1.2]
chefn9k [2017-03-14T07:49:03+00:00] INFO: Skipping removal of obsoleted cookbooks from the cache
chefn9k Synchronizing Cookbooks:
chefn9k [2017-03-14T07:49:03+00:00] INFO: Storing updated cookbooks/cisco-cookbook/recipes/cisco_interface.rb in the cache.
chefn9k [2017-03-14T07:49:03+00:00] INFO: Storing updated cookbooks/cisco-cookbook/recipes/cisco_interface_del.rb in the cache.
chefn9k   - cisco-cookbook (1.1.2)
chefn9k Installing Cookbook Gems:
chefn9k Compiling Cookbooks...
chefn9k Converging 1 resources
chefn9k Recipe: cisco-cookbook::cisco_interface_del
chefn9k   * cisco_interface[ethernet1/20] action create[2017-03-14T07:49:03+00:00] INFO: Processing cisco_interface[ethernet1/20] action create (cisco-cookbook::cisco_interface_del line 1)
chefn9k [2017-03-14T07:49:03+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:49:03+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:49:04+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k [2017-03-14T07:49:04+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k
chefn9k     - update access_vlan '200' => '1'[2017-03-14T07:49:04+00:00] WARN: /var/chef/cache/cookbooks/cisco-cookbook/files/default/vendor/gems/net_http_unix-0.2.1/lib/net_x/http_unix.rb:35:in `connect_unix': Object#timeout is deprecated, use Timeout.timeout instead.
chefn9k
chefn9k [2017-03-14T07:49:04+00:00] WARN: Skipping final node save because override_runlist was given
chefn9k [2017-03-14T07:49:04+00:00] INFO: Chef Run complete in 1.809047027 seconds
chefn9k [2017-03-14T07:49:04+00:00] INFO: Skipping removal of unused files from the cache
chefn9k
chefn9k Running handlers:
chefn9k [2017-03-14T07:49:04+00:00] INFO: Running report handlers
chefn9k Running handlers complete
chefn9k [2017-03-14T07:49:04+00:00] INFO: Report handlers complete
chefn9k Chef Client finished, 1/1 resources updated in 03 seconds
inohana@ino-ubuntu:~/chef-repo$

# Eth1/20 の VLAN が Vlan 200 から Vlan1 に変更されました

Eth1/20       --                 xcvrAbsen 1         auto    auto    --
```