This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from getpass import getpass | |
import argparse | |
import sys | |
import json | |
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
def options(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Copyright: (c) 2018, sky_jokerxx | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
try: | |
from pyVmomi import vim, vmodl | |
HAS_PYVMOMI = True | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Copyright: (c) 2018, sky_jokerxx | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
try: | |
from pyVmomi import vim, vmodl | |
HAS_PYVMOMI = True | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- before/vcenter_gather_moids.py 2018-03-11 19:39:17.424120400 +0900 | |
+++ after/vcenter_gather_moids.py 2018-03-11 19:39:11.644014260 +0900 | |
@@ -30,7 +30,8 @@ | |
'dvs_name': [vim.dvs.VmwareDistributedVirtualSwitch], | |
'datastore_name': [vim.Datastore], | |
'resourcepool_name': [vim.ResourcePool], | |
- 'portgroup_name': [vim.dvs.DistributedVirtualPortgroup, vim.Network]} | |
+ 'portgroup_name': [vim.dvs.DistributedVirtualPortgroup, vim.Network], | |
+ 'virtualmachine_name': [vim.VirtualMachine]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
if __name__ == '__main__': | |
url = "https://ansible tower ip or fqdn/api/v2/authtoken/" | |
headers = { "Content-Type": "application/json" } | |
data = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
if __name__ == '__main__': | |
url = "https://ansible tower ip or fqdn/api/v2/authtoken/" | |
headers = { "Content-Type": "application/json" } | |
data = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
array = [1, 2, 3] | |
array2 = [4, 5, 6] | |
array3 = [7,8,9] | |
array2.append(array3) | |
array.append(array2) | |
print(array) | |
def rec(a): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/chzyer/readline" | |
) | |
//type array []readline.PrefixCompleterInterface | |
//type array []readline.PrefixCompleter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost hoge5]# go run main.go --host 192.168.0.233 | |
Password: | |
Last login: Mon Jan 22 20:37:54 2018 from 192.168.0.231 | |
[root@localhost ~]# ls | |
anaconda-ks.cfg | |
[root@localhost ~]# exit | |
ログアウト |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# go build orishell.go | |
[root@localhost ~]# mv orishell /usr/local/bin |