Lines Matching refs:self

46     def __init__(self, ifname):
47 self._ifname = ifname
67 def ipaddr_list(self, filters=None):
69 self._ifname]
70 stdout = self.execute(cmd)
83 def create_address(self, ipaddr, addrobjname=None, temp=True,
85 if ifcheck and not self.ifname_exists(self._ifname):
87 cmd = ['/usr/sbin/ipadm', 'create-ip', self._ifname]
90 self.execute_with_pfexec(cmd)
91 elif addrcheck and self.ipaddr_exists(ipaddr, self._ifname):
99 '-p', 'mac-address', self._ifname]
100 stdout = self.execute(cmd)
104 if addrcheck and not self.ipaddr_exists(str(ll_addr),
105 self._ifname):
108 str(ll_addr), self._ifname]
111 self.execute_with_pfexec(cmd)
114 ipaddr, self._ifname]
118 self.execute_with_pfexec(cmd)
120 def create_addrconf(self, temp=True):
121 if not self.ifname_exists(self._ifname):
123 cmd = ['/usr/sbin/ipadm', 'create-ip', self._ifname]
126 self.execute_with_pfexec(cmd)
128 cmd = ['/usr/sbin/ipadm', 'show-addr', '-po', 'type', self._ifname]
129 stdout = self.execute(cmd)
134 self._ifname]
137 self.execute_with_pfexec(cmd)
139 def delete_address(self, ipaddr, addrcheck=True):
140 if addrcheck and not self.ipaddr_exists(ipaddr, self._ifname):
144 self._ifname]
145 stdout = self.execute(cmd)
152 self.execute_with_pfexec(cmd)
158 cmd = ['/usr/sbin/ipadm', 'delete-ip', self._ifname]
159 self.execute_with_pfexec(cmd)
161 def delete_ip(self):
162 if not self.ifname_exists(self._ifname):
165 cmd = ['/usr/sbin/ipadm', 'delete-ip', self._ifname]
166 self.execute_with_pfexec(cmd)
172 def __init__(self, dlname):
173 self._dlname = dlname
184 def create_vnic(self, lower_link, mac_address=None, vid=None, temp=True):
185 if self.datalink_exists(self._dlname):
200 '-m', mac_address, '-v', vid, self._dlname]
204 self.execute_with_pfexec(cmd)
206 def set_prop(self, pname, pvalue, temp=True):
208 % (pname, pvalue), self._dlname]
211 self.execute_with_pfexec(cmd)
213 def delete_vnic(self):
214 if not self.datalink_exists(self._dlname):
217 cmd = ['/usr/sbin/dladm', 'delete-vnic', self._dlname]
218 self.execute_with_pfexec(cmd)