Actually send the trub script.

        Args:
            resources (dict): A dictionary containing the required resources that
                we needed access to in order to perform this step.
516271
def run(self, resources):
        

        hwman = resources['connection']

        updater = hwman.hwman.app(name='device_updater')
        updater.run_script(self._script, no_reboot=self._no_reboot)
1192096
def _load_contents(self, polib, resource):
        
        import struct
        try:
            return polib.mofile(resource)
        except (ValueError, AttributeError, struct.error) as e:
            self.rethrow(
                "Invalid resource {0}".format(resource),
                InvalidResourceException)
49783
def put(self, request, **resources):
        
        if not self._meta.form:
            return None

        if not self._meta.name in resources or not resources[self._meta.name]:
            raise HttpError(
                "Resource not found.", status=status.HTTP_404_NOT_FOUND)
        resource = resources.pop(self._meta.name)

        updated = UpdatedList()
        for o in as_tuple(resource):
            form = self._meta.form(data=request.data, instance=o, **resources)

            if not form.is_valid():
                raise FormError(form)

            updated.append(form.save())

        return updated if len(updated) > 1 else updated[-1]
1068620
def resource(self, *resources):
        
        resources = tuple(self.resources) + resources
        return Resource(self.client, resources)
826071
def make_request(self, resource, params=None):
        
        if params is None:
            params = {}

        url = self.request_url(resource)
        params['format'] = 'json'

        r = self.session.get(url=url, params=params)

        r.raise_for_status()

        return r
500344
def setup_resource(self):
        
        template = self.template
        variables = self.get_variables()

        tclass = variables['Class']
        tprops = variables['Properties']
        output = variables['Output']

        klass = load_object_from_string('troposphere.' + tclass)

        instance = klass.from_dict('ResourceRefName', tprops)

        template.add_resource(instance)
        template.add_output(Output(
            output,
            Description="A reference to the object created in this blueprint",
            Value=Ref(instance)
        ))
404992
def update_resources(self, cpu, gpu, **kwargs):
        
        if self.status is Trial.RUNNING:
            raise ValueError("Cannot update resources while Trial is running.")
        self.resources = Resources(cpu, gpu, **kwargs)
1286664
def _build_resource(self):
        """"""
        resource = {"name": self.name}

        if self.dns_name is not None:
            resource["dnsName"] = self.dns_name

        if self.description is not None:
            resource["description"] = self.description

        if self.name_server_set is not None:
            resource["nameServerSet"] = self.name_server_set

        return resource
911258
def insert(self, context):
	
		
		
		status_code, msg = self.__endpoint.post(
			"/resources/connector-connection-pool",
			data={
				"id": self.__name,
				"resourceAdapterName": self.__res_adapter_name,
				"connectiondefinitionname": self.__conn_def_name,
				"property": props_value(self.__props)
			}
		)
		self.__available = True
1360798
def create(self, resource):
        
        uri = self.URI + self.RESOURCES_PATH
        return self._client.create(resource=resource, uri=uri)
581727
def make_resource_handle(self, resource_key, **variables):
        
        if variables.get("repository_type", self.name()) != self.name():
            raise ResourceError("repository_type mismatch - requested %r, "
                                "repository_type is %r"
                                % (variables["repository_type"], self.name()))

        variables["repository_type"] = self.name()

        if variables.get("location", self.location) != self.location:
            raise ResourceError("location mismatch - requested %r, repository "
                                "location is %r" % (variables["location"],
                                                    self.location))
        variables["location"] = self.location

        resource_cls = self.pool.get_resource_class(resource_key)
        variables = resource_cls.normalize_variables(variables)
        return ResourceHandle(resource_key, variables)
1078375
def move(self, auth, resource, destinationresource, options={"aliases": True}, defer=False):
        
        return self._call('move', auth, [resource, destinationresource, options], defer)
326454
def add(self, resource):
        
        if isinstance(resource, collections.Iterable):
            for r in resource:
                self.resources.append(r)
        else:
            self.resources.append(resource)
964488
def copy_resource_dir(src, dest):
    
    package_name = "mocha"
    dest = (dest + "/" + os.path.basename(src)).rstrip("/")
    if pkg_resources.resource_isdir(package_name, src):
        if not os.path.isdir(dest):
            os.makedirs(dest)
        for res in pkg_resources.resource_listdir(__name__, src):
            copy_resource_dir(src + "/" + res, dest)
    else:
        if not os.path.isfile(dest) and os.path.splitext(src)[1] not in [".pyc"]:
            copy_resource_file(src, dest)
1025699
def save_subresource(self, subresource):
        
        data = deepcopy(subresource._resource)
        data.pop('id', None)
        data.pop(self.resource_type + '_id', None)

        subresources = getattr(self, subresource.parent_key, {})
        subresources[subresource.id] = data
        setattr(self, subresource.parent_key, subresources)

        yield self._save()
681003
def add_changed_resources(self, resources, change=None):
        
        for resource in resources:
            rc = Resource(resource=resource, change=change)
            self.add(rc)
860981
def save_resource(self, name, resource, pushable=False):
        ''

        if pushable:
            self.pushable_resources[name] = resource
        else:
            self.resources[name] = resource