parameters: (self, resource)
docstring: resource的数据格式是一个列表字典，比如
              {
                  "group1": {
                      "hosts": [{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...],
                      "vars": {"var1": value1, "var2": value2, ...}
                  }
              }
  
          如果你只传入1个列表，这默认该列表内的所有主机属于my_group组,比如
              [{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...]
docstring_summary: resource的数据格式是一个列表字典，比如
              {
                  "group1": {
                      "hosts": [{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...],
                      "vars": {"var1": value1, "var2": value2, ...}
                  }
              }
docstring_tokens: resource的数据格式是一个列表字典，比如 { group1 : { hosts : [ { hostname : 10 . 10 . 10 . 10 port : 22 username : test password : mypass } ... ] vars : { var1 : value1 var2 : value2 ... } } }
function: def __init__(self, resource):
          """
          resource的数据格式是一个列表字典，比如
              {
                  "group1": {
                      "hosts": [{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...],
                      "vars": {"var1": value1, "var2": value2, ...}
                  }
              }
  
          如果你只传入1个列表，这默认该列表内的所有主机属于my_group组,比如
              [{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...]
          """
          self.resource = resource
          self.inventory = Inventory(host_list=[])
          self.gen_inventory()
function_tokens: def __init__ ( self , resource ) : self . resource = resource self . inventory = Inventory ( host_list = [ ] ) self . gen_inventory ( )