<s> from libcloud . compute . types import Provider <EOL> from libcloud . compute . providers import get_driver <EOL> cls = get_driver ( Provider . CLOUDSIGMA ) <EOL> driver = cls ( '<STR_LIT:username>' , '<STR_LIT:password>' , region = '<STR_LIT>' , api_version = '<STR_LIT>' ) <EOL> tags = driver . ex_list_tags ( ) <EOL> tag = [ tag for tag in tags if tag . name == '<STR_LIT>' ] [ <NUM_LIT:0> ] <EOL> nodes = driver . list_nodes ( ex_tag = tag ) <EOL> policy = driver . ex_list_firewall_policies ( ) [ <NUM_LIT:0> ] <EOL> for node in nodes : <EOL> driver . ex_attach_firewall_policy ( policy = policy , node = node ) </s>
