Revision da4a52a3 lib/opcodes.py
b/lib/opcodes.py | ||
---|---|---|
62 | 62 |
_PInstanceName = ("instance_name", ht.NoDefault, ht.TNonEmptyString, |
63 | 63 |
"Instance name") |
64 | 64 |
|
65 |
#: a instance UUID (for single-instance LUs) |
|
66 |
_PInstanceUuid = ("instance_uuid", None, ht.TMaybeString, |
|
67 |
"Instance UUID") |
|
68 |
|
|
65 | 69 |
#: Whether to ignore offline nodes |
66 | 70 |
_PIgnoreOfflineNodes = ("ignore_offline_nodes", False, ht.TBool, |
67 | 71 |
"Whether to ignore offline nodes") |
... | ... | |
1439 | 1443 |
OP_DSC_FIELD = "instance_name" |
1440 | 1444 |
OP_PARAMS = [ |
1441 | 1445 |
_PInstanceName, |
1446 |
_PInstanceUuid, |
|
1442 | 1447 |
_PForceVariant, |
1443 | 1448 |
("os_type", None, ht.TMaybeString, "Instance operating system"), |
1444 | 1449 |
("osparams", None, ht.TMaybeDict, "Temporary OS parameters"), |
... | ... | |
1451 | 1456 |
OP_DSC_FIELD = "instance_name" |
1452 | 1457 |
OP_PARAMS = [ |
1453 | 1458 |
_PInstanceName, |
1459 |
_PInstanceUuid, |
|
1454 | 1460 |
_PShutdownTimeout, |
1455 | 1461 |
("ignore_failures", False, ht.TBool, |
1456 | 1462 |
"Whether to ignore failures during removal"), |
... | ... | |
1462 | 1468 |
"""Rename an instance.""" |
1463 | 1469 |
OP_PARAMS = [ |
1464 | 1470 |
_PInstanceName, |
1471 |
_PInstanceUuid, |
|
1465 | 1472 |
_PNameCheck, |
1466 | 1473 |
("new_name", ht.NoDefault, ht.TNonEmptyString, "New instance name"), |
1467 | 1474 |
("ip_check", False, ht.TBool, _PIpCheckDoc), |
... | ... | |
1474 | 1481 |
OP_DSC_FIELD = "instance_name" |
1475 | 1482 |
OP_PARAMS = [ |
1476 | 1483 |
_PInstanceName, |
1484 |
_PInstanceUuid, |
|
1477 | 1485 |
_PForce, |
1478 | 1486 |
_PIgnoreOfflineNodes, |
1479 | 1487 |
("hvparams", ht.EmptyDict, ht.TDict, |
... | ... | |
1490 | 1498 |
OP_DSC_FIELD = "instance_name" |
1491 | 1499 |
OP_PARAMS = [ |
1492 | 1500 |
_PInstanceName, |
1501 |
_PInstanceUuid, |
|
1493 | 1502 |
_PForce, |
1494 | 1503 |
_PIgnoreOfflineNodes, |
1495 | 1504 |
("timeout", constants.DEFAULT_SHUTDOWN_TIMEOUT, ht.TNonNegativeInt, |
... | ... | |
1504 | 1513 |
OP_DSC_FIELD = "instance_name" |
1505 | 1514 |
OP_PARAMS = [ |
1506 | 1515 |
_PInstanceName, |
1516 |
_PInstanceUuid, |
|
1507 | 1517 |
_PShutdownTimeout, |
1508 | 1518 |
("ignore_secondaries", False, ht.TBool, |
1509 | 1519 |
"Whether to start the instance even if secondary disks are failing"), |
... | ... | |
1518 | 1528 |
OP_DSC_FIELD = "instance_name" |
1519 | 1529 |
OP_PARAMS = [ |
1520 | 1530 |
_PInstanceName, |
1531 |
_PInstanceUuid, |
|
1521 | 1532 |
_PEarlyRelease, |
1522 | 1533 |
_PIgnoreIpolicy, |
1523 | 1534 |
("mode", ht.NoDefault, ht.TElemOf(constants.REPLACE_MODES), |
... | ... | |
1536 | 1547 |
OP_DSC_FIELD = "instance_name" |
1537 | 1548 |
OP_PARAMS = [ |
1538 | 1549 |
_PInstanceName, |
1550 |
_PInstanceUuid, |
|
1539 | 1551 |
_PShutdownTimeout, |
1540 | 1552 |
_PIgnoreConsistency, |
1541 | 1553 |
_PMigrationTargetNode, |
... | ... | |
1560 | 1572 |
OP_DSC_FIELD = "instance_name" |
1561 | 1573 |
OP_PARAMS = [ |
1562 | 1574 |
_PInstanceName, |
1575 |
_PInstanceUuid, |
|
1563 | 1576 |
_PMigrationMode, |
1564 | 1577 |
_PMigrationLive, |
1565 | 1578 |
_PMigrationTargetNode, |
... | ... | |
1589 | 1602 |
OP_DSC_FIELD = "instance_name" |
1590 | 1603 |
OP_PARAMS = [ |
1591 | 1604 |
_PInstanceName, |
1605 |
_PInstanceUuid, |
|
1592 | 1606 |
_PShutdownTimeout, |
1593 | 1607 |
_PIgnoreIpolicy, |
1594 | 1608 |
("target_node", ht.NoDefault, ht.TNonEmptyString, "Target node"), |
... | ... | |
1603 | 1617 |
OP_DSC_FIELD = "instance_name" |
1604 | 1618 |
OP_PARAMS = [ |
1605 | 1619 |
_PInstanceName, |
1620 |
_PInstanceUuid, |
|
1606 | 1621 |
] |
1607 | 1622 |
OP_RESULT = ht.TDict |
1608 | 1623 |
|
... | ... | |
1612 | 1627 |
OP_DSC_FIELD = "instance_name" |
1613 | 1628 |
OP_PARAMS = [ |
1614 | 1629 |
_PInstanceName, |
1630 |
_PInstanceUuid, |
|
1615 | 1631 |
("ignore_size", False, ht.TBool, "Whether to ignore recorded size"), |
1616 | 1632 |
_PWaitForSyncFalse, |
1617 | 1633 |
] |
... | ... | |
1626 | 1642 |
OP_DSC_FIELD = "instance_name" |
1627 | 1643 |
OP_PARAMS = [ |
1628 | 1644 |
_PInstanceName, |
1645 |
_PInstanceUuid, |
|
1629 | 1646 |
_PForce, |
1630 | 1647 |
] |
1631 | 1648 |
OP_RESULT = ht.TNone |
... | ... | |
1641 | 1658 |
OP_DSC_FIELD = "instance_name" |
1642 | 1659 |
OP_PARAMS = [ |
1643 | 1660 |
_PInstanceName, |
1661 |
_PInstanceUuid, |
|
1644 | 1662 |
("disks", ht.EmptyList, |
1645 | 1663 |
ht.TOr(ht.TListOf(ht.TNonNegativeInt), ht.TListOf(_TDiskChanges)), |
1646 | 1664 |
"List of disk indexes (deprecated) or a list of tuples containing a disk" |
... | ... | |
1713 | 1731 |
OP_DSC_FIELD = "instance_name" |
1714 | 1732 |
OP_PARAMS = [ |
1715 | 1733 |
_PInstanceName, |
1734 |
_PInstanceUuid, |
|
1716 | 1735 |
_PForce, |
1717 | 1736 |
_PForceVariant, |
1718 | 1737 |
_PIgnoreIpolicy, |
... | ... | |
1757 | 1776 |
OP_DSC_FIELD = "instance_name" |
1758 | 1777 |
OP_PARAMS = [ |
1759 | 1778 |
_PInstanceName, |
1779 |
_PInstanceUuid, |
|
1760 | 1780 |
_PWaitForSync, |
1761 | 1781 |
("disk", ht.NoDefault, ht.TInt, "Disk index"), |
1762 | 1782 |
("amount", ht.NoDefault, ht.TNonNegativeInt, |
... | ... | |
1772 | 1792 |
OP_DSC_FIELD = "instance_name" |
1773 | 1793 |
OP_PARAMS = [ |
1774 | 1794 |
_PInstanceName, |
1795 |
_PInstanceUuid, |
|
1775 | 1796 |
_PEarlyRelease, |
1776 | 1797 |
_PIAllocFromDesc("Iallocator for computing solution"), |
1777 | 1798 |
_PTargetGroups, |
... | ... | |
1911 | 1932 |
OP_DSC_FIELD = "instance_name" |
1912 | 1933 |
OP_PARAMS = [ |
1913 | 1934 |
_PInstanceName, |
1935 |
_PInstanceUuid, |
|
1914 | 1936 |
("mode", ht.NoDefault, ht.TElemOf(constants.EXPORT_MODES), |
1915 | 1937 |
"Export mode"), |
1916 | 1938 |
] |
... | ... | |
1937 | 1959 |
OP_DSC_FIELD = "instance_name" |
1938 | 1960 |
OP_PARAMS = [ |
1939 | 1961 |
_PInstanceName, |
1962 |
_PInstanceUuid, |
|
1940 | 1963 |
_PShutdownTimeout, |
1941 | 1964 |
# TODO: Rename target_node as it changes meaning for different export modes |
1942 | 1965 |
# (e.g. "destination") |
... | ... | |
1968 | 1991 |
OP_DSC_FIELD = "instance_name" |
1969 | 1992 |
OP_PARAMS = [ |
1970 | 1993 |
_PInstanceName, |
1994 |
_PInstanceUuid, |
|
1971 | 1995 |
] |
1972 | 1996 |
OP_RESULT = ht.TNone |
1973 | 1997 |
|
Also available in: Unified diff